The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get user email address via API using Accountid

Vikrant Yadav
Community Champion
April 15, 2025

Hi Experts,

Need your help in an API request to get user email address using accountId.

User set email visibility to private for his account.

Using this api : https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get

 

emailAddress parameter is empty. 
please suggest a way to get user email address

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Vikrant Yadav
Community Champion
April 15, 2025
I am able to figure out the solution. Using this below API we can get email Address of a user, even if user set email visibility to Private. 

curl --location 'https://api.atlassian.com/admin/v1/orgs/{{ordID}}/users/search' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer TOKEN' \
--data '{
"accountIds": ["accountID"],
"expand": ["NAME", "EMAIL"]

}
'

https://jira.atlassian.com/browse/ID-8222 

0 votes
Bill Sheboy
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 Champions.
April 15, 2025

Hi @Vikrant Yadav 

If you follow that REST API endpoint's linked content, it indicates an app would need additional Atlassian review / approval to do this...along with several caveats and restrictions. 

If that does not match your scenario needs, you could try using the mention capabilities with the account ID and a selected work item, although that relies upon the person having notifications enabled.

Kind regards,
Bill

Vikrant Yadav
Community Champion
April 15, 2025

Hi @Bill Sheboy  This API is giving email address for other users but for a single user only it's not showing user emaail via API. Due to User personal settings, user make it's email address Private that's why not visible via Get user.API

But as Admin there should be an API which give user email address even if user set email visiblity to private. 

Bill Sheboy
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 Champions.
April 16, 2025

I agree, and I am glad to learn you found a new endpoint to find the information.

Like Vikrant Yadav likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events