Get users email as system admin in jira

Hi,
I am an DevOps manager and at my company we use Jira Software (Cloud) as organization,
In the jira website i can see my users email but when using /rest/api/3/user?accountId=*******
i don’t see them, trying to use other api don’t work as well.

*I have full admin rights and i am the paying user on this account.

How can i get access to my users email by script?

Hi,

There are lots of caveats on how to get an email. Let’s try to focus on your use case, which is to get access to email via API, and how to do it.

  • You are right that you can do this via GET User API.
  • You can make this API call via basic authentication (i.e. email and API token). This page shows how to get API token and use it in REST calls.
  • Once you have done the above, you should be able to make an API call and see the user’s email address.
  • Even if you are the admin in the site, there is a case where you still can’t see the user’s email. Which is, if a user decides to hide their email as per GDPR. They can do this via profile management page. In this case, you will get all the details of the user while making the above API call except email.

You can read more about guidelines for requesting access to email address which elaborates on all of this and more.

Hi,
@aagrawal2 I am using GET User API via basic authentication.
but non of my user have an email(but i can see their email in the JIRA website under the Administration page), most of them haven’t change their profile.

To check that its not related to the user profile management page, i have create a new user and registered it to our Jira cloud without changing any of the default settings, and still i don’t see his email through the jira api.

Hi @arjunshrivastava1,

That is the intended behaviour as emails are private by default. In GET user Jira API, admins will not be able to see email address unless the user has set there privacy setting for email to “anyone”. Whereas, you will be able to see email only in user admin page and nowhere else.

You can give above a try by changing the privacy settings of email in a user account and making the API call subsequently.

Cheers.