Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get Email address from a user account with Jira API

Dear all,

I have run the following script from script runner 

The userAccountId is retrieved from a UserPicker field

def user = get('/rest/api/2/user/email?accountId='+ userAccountId)
.header('Content-Type', 'application/json')

return user

The idea is to retrieve the email address of the given Account ID.

What is wierd out of this call of the API is that in the return Json I have no email address key.
In an other hand if I go to the profile of that user, then I can see that its email is correctly set.


Any idea why I cannot retrive the Email adress from my User Picker field ?

2 answers

1 accepted

1 vote
Answer accepted

From your Atlassian instance go to the email profile visibility setting :

Then at the bottom of the page from the Contact section, change your email visiblility to Anyone

Hi, i think that the problem is:

Captura de Pantalla 2021-03-12 a la(s) 10.11.44.png

Only apps that meets the Guideline can access to this information

@Juan Manuel Ibarra , as you can see first is that I am using the API version 2

I mange to find out the reason and it has nothing to do with the API but instead about the security and visibility parameters in the profile section

By changing Email visibility to anyone, the API return correctly the email address in the json response


Like Juan Manuel Ibarra likes this

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you