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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.