Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,551,972
Community Members
 
Community Events
184
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
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 03, 2021

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
Atlassian Team members are employees working across the company in a wide variety of roles.
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? 

Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 08, 2021

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
AUG Leaders

Atlassian Community Events