Obtain a List of Users Assigned Individually or Through a Group to an Okta Application via API
Last Updated:
Overview
Administrators often need to obtain a list of users assigned to an application individually or through a group. Retrieve this list by making an Okta REST API call and filtering the results by assignment scope.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta REST API
- Application Assignment
- Reporting
Solution
What are the steps to obtain a list of users assigned to an application via the Okta REST API?
Retrieve a list of users assigned to an application by importing the Apps API collection into Postman, executing the list users call, and converting the resulting JSON file to a CSV file to filter by assignment scope as detailed in either the video demonstration or the written instructions.
- Set up a Postman environment by following the instructions in Set up an environment.
- Select the Run in Postman button in the Application Operations documentation to import the Apps API collection.
- Run a List users assigned to an application call from the left pane of Postman by navigating to Apps > List Users Assignment to App.
GET /api/v1/apps/${applicationId}/users
- Select Send and Download, and save the output locally as a JSON file.
- Use a third-party tool to convert the JSON file to a CSV file.
- Filter by the scope column within the CSV file.
- For users individually assigned to an application, the scope is USER.
- For users assigned to an application via a group, the scope is GROUP.
