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)
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 ?
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
@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
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