When I have the username how can I get the accountId from the user? How can I find it via REST API? I dont have any other data except for the user name
You can use the Find users endpoint to do it, it takes either the display name or the email address to find the user. Get user endpoint used to take the username, but that has been deprecated because of GDPR, you can see the notice here.
Thanks, is there a way to get the display name or the mail address via the user name?
If you are on Data Center/Server then the Get user endpoint still takes the username, it is only on Cloud that it does not, and on Cloud your username is your email.
thank you, i didnt know that
@Mikael Sandberg You mentioned using the "Find User" API call and I think you are referring to the "query" parameter to search by the person's name or email address, but that does seem to actually return any matches.
This seemed like an odd thing to leave in anyway, if Atlassian was getting away from people names due to GDPR. So, maybe 'query' does not work either ?
I can get results if I specify an accountId as the parameter.
Thanks
@Rodney Dsouza _Atlassian Certified Expert_ Yes, the query is still working and it will return the user if it exists:
https://your-instance.atlassian.net/rest/api/3/user/search?query=the.email@somewhere.com
It looks like you're new here. Sign in or register to get started.