Through other posts I've found that I can use the API and hit something like https://servername/rest/api/2/user/search?username=a to get all users. However, this doesn't seem to match the CSV file I can get if I manually export users through admin.atlassian.com (documentation for this -> https://confluence.atlassian.com/cloud/export-users-from-a-site-833925313.html).
How do I get that same list through the API since it shows whether the user has access to Jira Software, Jira Core, and Confluence?
Hi @Austin Yu ,
Welcome to the Atlassian Community!
As announced in the Say goodbye to usernames in Atlassian Cloud documentation page, we removed the username field from user profiles in Atlassian Cloud sites in order to improve users' privacy and comply to GDPR.
This has also impacted the endpoint you are using and you can find detailed information about the changes in the below links:
Now, if you are trying to get the list of users having access to a particular product using REST API in Cloud, you may want to use the Jira Core REST API endpoint /rest/api/<VERSION>/group/member passing as the argument the name of the group that gives access to the desired product. For example, if you want to get the list of all the users having Confluence product access, you can call:
https://XXXXXX.atlassian.net/rest/api/3/group/member?groupname=confluence-users
If you are trying to achieve something different instead, please provide as many details as possible.
Cheers,
Dario
Hi Dario,
Thanks for the response!
Sorry for the confusion I don't necessarily need the username specifically. I'm really just looking to get that same csv file that is provided when I click on export users in the Atlassian Cloud user management page with 'all users' selected for the user status option and 'product access' selected in the additional data section, but through an API call.
Is this possible? and if so, how would that be done?
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Austin Yu ,
This is not possible at the moment, therefore I have created the below feature request on your behalf to ask to have this functionality implemented:
As I have written in there, there is a "dirty" workaround that can be used in the meanwhile, however please notice that this is not officially supported and it may change in the future:
Workaround
It is possible to grab the cookie from an active site-admin session from the browser and then use it to authenticate a REST API POST request sent to the below internal endpoint (replace <CLOUD-ID> with your real cloud instance id):
https://admin.atlassian.com/gateway/api/adminhub/um/site/<CLOUD-ID>/users/exportAs the body you can send something like:
{ includeApplicationAccess: true includeGroups: false includeInactiveUsers: true selectedGroupIds: [] }Please notice this is just a workaround, the endpoint is not official, not documented and may change over time.
Let me know if this helps.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome @Austin Yu !
Please accept the answer or, if you don't mind, I will do it tomorrow since you confirmed this can work for the time being :)
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.