{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"d3e5913e-9552-41f5-9bfb-0ebf2b779272","name":"Plex IAM APIs","description":"The IAM APIs allow for the provisioning and deprovisioning of accounts in IAM.\n\nAll changes made with the IAM APIs affect the Production environment.\n\n# Getting Started\n\n### IAM Client Credentials\n\n1. Navigate to accounts.plex.com and under the ‘Enterprises’ menu and select your Enterprise.\n    \n2. Now, select ‘Manage Applications’ from the top navigation bar.\n    \n3. Next, click the ‘Create’ button.\n    \n4. You will be presented with your Client ID, which you can then copy.\n    \n5. Configure the application as needed for your use and click the ‘OK’ button at the bottom of the screen.\n    \n6. Upon selecting ‘OK’ you will be presented with the client secret. It will only be presented this one time. **Be sure to copy it and store it in a safe place.**\n    \n\n### Storing your IAM tenantId\n\nThe **tenantId** is used to identify what tenant you will be managing your users or authorities. This should be stored in your system, in your HCM or other system that begins the user provisioning process.\n\nTo get your **tenantId**, login to [https://accounts.plex.com](https://accounts.plex.com) > Navigate to **Enterprises (Corporations)** > Select your **Enterprise** > Find and Click your **Tenant** in the table\n\nYou can find your **tenantId** in the URL bar as a path parameter after **tenant**\n\n### Storing your IAM authorityId\n\nYour **authorityId** is the ID for your identity provider(s) (IdP). This can be Plex IdP, Azure AD, or Okta. If using a 3rd Party IdP, the authority must be setup before an account can be linked to it.\n\nTo get your **authorityId**, login to [https://accounts.plex.com](https://accounts.plex.com) > Navigate to **Enterprises (Corporations)** > Select your Enterprise > Click **Authorities** > Find and click your **IdP**\n\nOnce you click into your authority, you will see the ID in the URL as a path parameter after **authorities/**\n\n### Storing your Plex Developer portal Keys\n\nTo authenticate using the **/employees** endpoints, you must use a valid **subscription key header**.\n\nThis will be stored as **subscriptionKeyHeader** in the environment variable.\n\nOther headers also include the **tenantId** which will perform the request for a tenant that is not your default tenant. For more details on getting started with the Plex Connect APIs see [https://new.developers.plex.com/getstarted](https://new.developers.plex.com/getstarted)\n\n### Setup your environment variables in Postman\n\nStart by navigating to the shared environment - **Plex IAM API Environment** and then click **Edit**\n\nThere you can enter in the **CURRENT VALUE** for your credential.\n\nThe **clientId** and **clientSecret** will be used with the **POST /op/token** (using Basic Auth) to generate the **accessToken**. On a successful response the **accessToken** will automatically be stored as a variable to authenticate your other endpoints used as a bearer token.\n\n# API Use Cases\n\nListed here are the standard use cases for using the IAM APIs to create a new user and employee triggered from an external system. This external system can be your HR, HCM, or any outside directory.\n\n### Prerequisites\n\nBefore you start there are a few recommended values that should exist in your external system that will help limit calls to additional endpoints and help identify your user accounts and employee records.\n\n<table><tbody><tr><td><div><b>Identifier</b></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div><b>Description</b></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><b>tenantId</b></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>This is used to identify your tenant. This should be stored when creating, updating, and removing users.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><b>authorityId</b></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>This is used to identify your IdP (Plex, Azure AD, or Okta) and will be used to setup your account, link additional IdPs to an account, or when revoking access.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><b>accountId</b></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Used to identify the user in IAM. This should be stored on your user record in your source system (HR, HCM, etc). This will help when updating and removing access for that user without using multiple endpoints to query.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><b>employeeId</b></div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Used to identify the employee record in PMC. This should be stored in your source system to avoid additional queries when looking up the employee record for updates, inactivation and reactivation. This ID will be different then the accountId in IAM.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n**Links to Use Cases**\n\n- [Provision a User Account](#bf1820ed-8ec9-4553-bd30-7a0378ac324c)\n    \n- [Update User Accounts](#83c108cf-ab65-47b1-bed8-94b6a48290e4)\n    \n- [Deprovision a User Account](#b852aff6-89bf-4a4f-b546-c532dabf9974)\n    \n- [Reactivate a User Account](#78e02567-d444-4e2c-979d-2f8b076eb41c)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"15704995","collectionId":"d3e5913e-9552-41f5-9bfb-0ebf2b779272","publishedId":"UVJfjvCx","public":true,"publicUrl":"https://documenter-api.postman.tech/view/15704995/UVJfjvCx","privateUrl":"https://go.postman.co/documentation/15704995-d3e5913e-9552-41f5-9bfb-0ebf2b779272","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"01a1dd"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.12.10","publishDate":"2021-12-15T19:23:18.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Plex IAM API Environment","id":"2da28b9a-2ad3-4eff-82b7-f6523c8ba1af","owner":"15704995","values":[{"key":"token_endpoint","value":"https://accounts.plex.com/op/token","enabled":true},{"key":"baseURL","value":"https://accounts.plex.com","enabled":true},{"key":"version","value":"/v1","enabled":true},{"key":"clientId","value":"ENTER CLIENT ID HERE","enabled":true},{"key":"clientSecret","value":"ENTER CLIENT SECRET HERE","enabled":true},{"key":"tenantId","value":"ENTER TENANT ID HERE","enabled":true},{"key":"authorityId","value":"ENTER AUTHORITY ID HERE","enabled":true},{"key":"accessToken","value":"WILL AUTO-FILL WITH SUCCESSFULL AUTH","enabled":true},{"key":"accountId","value":"WILL AUTO-FILL WHEN CREATING A NEW USER","enabled":true},{"key":"alternativeTenantId","value":"USED FOR TEST TO ASSOCIATE ANOTHER TENANT TO A NEW ACCOUNT","enabled":true},{"key":"subscriptionKeyHeader","value":"ENTER PLEX DEVELOPER PORTAL KEY HERE","enabled":true},{"key":"employeeId","value":"WILL AUTO-FILL WHEN CREATING AN EMPLOYEE RECORD","enabled":true},{"key":"accessGrantId","value":"WILL AUTO-FILL GET ACCESS GRANTS","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Plex IAM API Environment","value":"15704995-2da28b9a-2ad3-4eff-82b7-f6523c8ba1af"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/UVJfjvCx"}