You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have seen a couple of posts, but am not getting a good answer to how I can find the accountId of the user. I know the user email address, so what I have been doing is following this link below:
https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-user-bulk-migration-get
I type in the email address as both the username and key and I get this back:
I even tried with the display name
[ { "username": "xxx@hotmail.com", "accountId": "unknown" }]
Why am I getting an unknown?
Thanks
Hello Chan,
Thank you for reaching out to Atlassian Community!
Testing using the details you provided, to be honest, I couldn't make the "Get account IDs" work, but the good thing is that there are two other options to get the account id.
The first option is to use the "Group and user picker" API that will return the information about the user using their email address.
curl --request GET \
--url 'https://domain.atlassian.net/rest/api/3/groupuserpicker?query=user@domain.com' \
--user 'admin@domain.com:A1b2345CdEfgHIJkLMn67O8Q' \
--header 'Accept: application/json'
The second option is to use REST API call below directly in the browser:
https://domain.atlassian.net/rest/api/latest/user/search?query=user@domain.com
Please, give it a try and let us know how it goes.
Regards,
Angélica
Wow... Thanks a lot Angélica. This is amazing.....worked like a charm!
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.
Great! Thanks Angélica. The documentation does not elaborate what the end point expects as query params. Was trying JQL for the whole time without result. Thanks again :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does a similar solution exist for Confluence? I am attempting to use the /wiki/rest/api/user/bulk/migration endpoint to return accountIds from usernames, but I only get the same usernames returned to me that I passed in, with no accountIds.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Angélica!!!. You saved a lot of time. I was also stuck with the JQL which wasted a lot of time. This worked like a charm.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Angelica! what should I do if I have like 100 users i need accountid of? ii cant just go one by one right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is from the latest documentation:
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.