Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,406
Community Members
 
Community Events
165
Community Groups

Getting a full list of users across all products under a site with REST API

Hello folks,

I'm wondering if there's a way to fetch all user accounts (managed and external) for a specific site via the REST API with at least their Atlassian userIDs and email addresses?

Atlassian Access provides a convenient way of doing this through the exporter and even lets me select what information I want to see, however, we have about a dozen sites within our org and ideally, we'd like to automate this process.

I realize that I can get a complete list of user accounts managed by our 1 central org with single export within Atlassian Access, however, this type of export excludes users that are not managed by our org. I need all accounts and not just the managed ones and as far as I know, there isn't a good way to do this. 

Is there something I'm missing here?

Thank you,

Andrey

1 answer

1 accepted

3 votes
Answer accepted

Hello @Andrey Popov,

Thank you for reaching out to Atlassian Community!

Searching on our documentation and some similar cases, I’m afraid to say that it’s not possible to get all users from different sites using one endpoint. 

With the API below, you can get all managed accounts from an Organization:

- https://developer.atlassian.com/cloud/admin/organization/rest/api-group-orgs/#api-orgs-orgid-users-get

curl --request GET \ 
--url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/users' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'

Then, to get users from different sites, it will be necessary to use the API below for each one:

 - https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-users-search-get

curl --request GET \ 
--url 'https://your-domain.atlassian.net/rest/api/2/users/search' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'

Note that, the Get all users API will only return their email addresses if they set the permission to “Anyone” on their profile on https://id.atlassian.com/manage-profile/profile-and-visibility, so to be honest, the best option would be to use the “Export users” on User management.

Kind regards,
Angélica

Dave Meyer Atlassian Team Sep 04, 2021

We do have plans to address the API gaps in this area. We'll provide updates on this feature request: https://jira.atlassian.com/browse/ID-6965

Like # people like this

Thank you @Angélica Luz and @Dave Meyer - it's encouraging to hear that the API expansion is in the works. Can you please help me better understand if there's a specific threshold (ex: number of votes) that a feature request must exceed in order for the product team to move forward with development? 

Hi Andrey,

There are many factors that are taken into consideration when implementing a new feature. 

For more information, please check our policy below:

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Atlassian Access

Atlassian Access Demo Q&A Recap

Hi Community! Thank you to all who joined our ongoing monthly Atlassian Access demo! We have an engaging group of attendees who asked many great questions. I’ll share a recap of frequently ask...

1,160 views 4 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you