It's possible to get emailAddress of assignee on JIRA API with admin credential?

Gabriel Oliveira January 16, 2020

Hi, I use Jira API to sync issues data on our systems.

I need the `emailAddress` field of assignee of a issue. But after research I see that this field is not returned because user privacy.

Admin user can view all users e-mail on Jira GUI, so API with the admin credentials can not see the e-mails of users?

There's a way to retrieve the email of users on Jira API?

2 answers

1 accepted

1 vote
Answer accepted
Deleted user January 20, 2020

Hi @Gabriel Oliveira,

I guess you are running into the GDPR changes from last year. In order to access the email address, you need to have an approved app. Please read the following article for more information: https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603

If your app is not approved or you're writing some custom scripts, then your users need to change the visibility of the email address to "public". I'm not sure if it's sufficient to have an admin user making the HTTP requests to see the emails.

There are various posts about the GDPR changes. See the following search on the Atlassian developer community for "GDPR weekly" where Atlassian provided all the changes in detail: https://community.developer.atlassian.com/search?q=weekly%20gdpr%20order%3Alatest

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 17, 2020

Hello @Gabriel Oliveira ,

If your trying to pull the email from the assignee field of an issue, I believe you should be able to do a "GET /rest/api/3/issue/{issueIdOrKey}" and expand by adding a "?fields=assignee" to see the email address for the assignee field of that issues.

Try in this format and let me know if this is what you're looking for:

curl -D- -u user:API_Token -X GET -H "X-Atlassian-Token: no-check" https://{base_url}.atlassian.net/rest/api/3/issue/{issueIDOrKey}?fields=assignee

Regards,
Earl

Suggest an answer

Log in or Sign up to answer