<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
System Status
Announcements
Announcements
Search
Search
Select Language

Assigning Users to Apps Using Okta APIs

Lifecycle Management
Okta Classic Engine
Okta Identity Engine

Overview

Assigning users to an application in Okta requires a POST request to /api/v1/apps/{appId}/users with the user ID, scope, and credentials. This can be performed using the Rockstar Browser Extension's API Explorer or another compatible API client tool. Following the steps in this article resolves the assignment.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta APIs
  • User Lifecycle Management
  • Rockstar Browser Extension

Solution

Assigning a User to an Application via the Okta API

Use the POST method to assign a user to an application by sending the required parameters to the Okta API endpoint.

The API call uses the POST method with the following endpoint:

/api/v1/apps/{appId}/users

 

The following is a request sample:

curl -i -X POST \
  'https://subdomain.okta.com/api/v1/apps/{appId}/users' \
  -H 'Authorization: AUTH_INFO_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "00ud4tVDDXYVKPXKVLCO",
    "scope": "USER",
    "credentials": {
      "userName": "user@example.com"
    }
  }'

This can be performed using a compatible API client tool (for example, Rockstar or Postman; use the tool that best fits organizational guidelines).

 

How is the assignment completed using the Rockstar browser extension?

Use the Rockstar Browser Extension's API Explorer to submit the assignment request directly from the application page.

  1. Open the application page in Okta.
  2. Open the Rockstar Browser Extension and click API Explorer.
  3. Choose Post and select /api/v1/apps/${appId}/users from the dropdown menu.
  4. Fill in the body with the following request example:
    {
      "id": "00ur4avh58WRo4O9i417",
      "scope": "USER",
      "credentials": {
        "userName": "user@example.com"
      }
    }

API User Example

  1. Click Send. The response displays Status: 200 success to confirm the request completed successfully.

200 success

 

Loading
Assigning Users to Apps Using Okta APIs | Okta Support