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
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"]
}
'
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I agree, and I am glad to learn you found a new endpoint to find the information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.