Fetch all Atlassian Cloud users via user provisioning SCIM API
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Run the Get users SCIM REST API to fetch all users from the user provisioning directory at the Atlassian organization.
Environment
User provisioning integration with an Atlassian Cloud organization.
Solution
SCIM API request examples
The following example will provide a list of the first 100 users in the provisioning directory. To fetch beyond the initial 100 users, use the startIndex parameter in your API request.
curl --request GET \ --url 'https://api.atlassian.com/scim/directory/{directoryId}/
Users' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'In this example, replace the below values as appropriate:
directoryID: This is the ID of the user provisioning directory created at Atlassian organization
access_token: This is the API token generated for the user provisioning directory
Fetch User 101 to 200 example
If we use startIndex, we'll be able to control exactly which users are returned by their index number. This parameter can be implented one of two ways:
Example 1:
curl --request GET \
--url 'https://api.atlassian.com/scim/directory/{directoryID}/Users?startIndex=101' \
--header 'Authorization: Bearer <API KEY>'Example 2:
curl --request GET \
--url 'https://api.atlassian.com/scim/directory/{directoryID}/Users?startIndex=101&count=200' \
--header 'Authorization: Bearer <API KEY>'Was this helpful?