Get all users in an org doesnt return all users using rest api

Deleted user August 3, 2022

I am trying to use Power Automate to call this https://api.atlassian.com/admin/v1/orgs/<resource-name>.  I only get about 50 users and i do not understand how or where to enter the cursor query parameter?  Any help would be appreciated.  Thanks.

1 answer

1 vote
Connor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2022

Hi Shone, looks like you're trying to use this API request, https://developer.atlassian.com/cloud/admin/organization/rest/api-group-orgs/#api-orgs-orgid-users-get, is that correct?

Regarding the # of results returned in your query, this is what Atlassian's documentation states:

The organizations REST API uses pagination to conserve server resources and limit response size. If there are more results available after the current page, a link to the next page of results is included in the JSON. You can use the cursor parameter to set a specific starting point for the results.

If you have more than 50 users but only receiving 50 in the response, then you'll need to query again but include the cursor parameter to set the result starting point to be the link to the next page of results. I don't have 50+ users to test, but I think the cursor parameter would be added to your request like this:

https://api.atlassian.com/admin/v1/orgs/{orgId}/users?cursor={NextResultsPageLink}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events