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 Authenticate for Get user account with REST API

Dear all,

I am trying to get information about a user account from a UserPicker custom field

For that I have a custom field User Account available and I am able to retrive its information as seen below :

{self=, accountId=5c0f8b8c3acad8551c338a8f, avatarUrls={48x48=, 24x24=, 16x16=, 32x32=}, displayName=Tom smith, active=true, timeZone=Europe/Zurich, accountType=atlassian}"

when I am running the first call inside Script runner console, I am running is as Current user which is my Admin account

Then from that account information, I need to retrive the user email. For that I was using the following code below :

String userAccountId=issuefields[].accountId

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

Please note that the variable userAccountId is containing correct account value 5c0f8b8c3acad8551c338a8f

When I am executing this request, I get the following error :

{errorMessages=[Specified user does not exist or you do not have required permissions], errors={}}"


Any idea what I am doing wrong as the account is existing and the script is executing as current user which as Admin write.

Do I need to authenticate differenly for that user endpoint ?

Thanks for help


0 answers

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