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 values below
as appropriate:
directoryID: The ID of the user provisioning directory created at the Atlassian organization. The organization can be retrieved via the Get organizations API. And then the directory ID can be retrieved via the API Get directories in an organization API.
access_token: The API token generated for the user provisioning directory. API tokens for your Atlassian account can be found in the Manage API tokens for your Atlassian account.
Fetch User 101 to 200 example
If we use startIndex, we can 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?