How to get a user's accountId?

Andrei Iorga November 11, 2020

Hi, is there a way to get a user's accountId based on his username or email using jira rest api?

I tried to get it from this endpoint but the accountId param is not in the response anymore :

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

 

I also tried this link but this one it doesn't seems to work at all:

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

Thank you

 

1 answer

0 votes
Sramanth Pandeti
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2020

Hi @Andrei Iorga , you can get the account ID from your user profile as mentioned here in this thread: https://community.atlassian.com/t5/Jira-questions/how-to-find-accountid/qaq-p/1111436

or via rest api, you can try one of the options mentioned here: https://community.atlassian.com/t5/Jira-questions/where-can-i-find-my-Account-ID/qaq-p/976527

Andrei Iorga November 12, 2020

Hi @Sramanth Pandeti I am interested in the rest api option but when I try to get the user details based on his username:

http://my-jira-url/rest/api/2/user?username=my-username

In the official documentation ( https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-user-get ) it says that in the response json should be an accountId field but when I call the endpoint I don't get that field. I read something that they removed it because of GDPR. So this is why I can't use the options mentioned in that thread. If you have any other suggestion I would appreciate. Thank you.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events