Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Atlassian Admin API not returning full list of Users

Daniel Valenzuela
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 24, 2022

I am trying to use the Admin REST API to get a list of users. This is to go through the list and disable users based on criteria. That way they are disabled across all atlassian products with our company.

However I am not getting full list of users. 

I have generated an API Key, and in Postman added it as a Bearer Token and with this. Per API details sending 

curl --request GET \ --url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/users' \

--header 'Authorization: Bearer <access_token>' \

--header 'Accept: application/json'

 

For example, in the returning payload my name is not returning. I have access to JIRA, Bitbucket, Opsgenie and Status Page. Which means for some reason full list of all users is not returning. 

I don't want to use JIRA to get list of users, because some users may be in other Atlassian products but not JIRA. 

1 answer

0 votes
Mohamed Riza _ServiceRocket_
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.
March 24, 2022

Hi @Daniel Valenzuela 

Are you getting a fixed number of users being returned? If so, I suspect that you are only probably seeing this first page of the results. This is because I see that GET /admin/v1/orgs/{orgId}/users has a query parameter 'cursor' which sets the starting point for the page of results to return. If you set this, do you see different users being returned. If so, then you may have to loop through the pages till you get to all the users information. 

Hope that helps. 

Suggest an answer

Log in or Sign up to answer