Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,696
Community Members
 
Community Events
184
Community Groups

How to receive e-mail address of user with scriptrunner

Hi,

How can I receive the e-mail address of an user with scriptrunner?
With Postman it is no problem to see the e-mail address of an user. But with scriptrunner it seams to restrict the access to the e-mail addresses. I tried the script with my user (org and site Admin) and the scriptrunner user. 

Thanks

2 answers

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Feb 04, 2021

Hi Robin,

Thank you for your question.

I can confirm that unfortunately, that the Get User Email API which Atlassian provides is an experimental API, which currently is not supported by ScriptRunner for Jira Cloud as currently, we do not support these experimental API's as these change how they work or become deprecated and we are not currently supporting have the App whitelisted to be able to access all users email addresses.

However, I can confirm you can get a users email address by calling the Get User Rest API  as this will return a users email address if they have chosen not to hide it in their privacy settings.

It is worth noting that a users email address may be hidden as Atlassian added in the option for users to hide their email address in the GDPR changes they made in 2019 as described here and if a user chooses to hide this then it will not be possible for ScriptRunner for Jira Cloud to return this as we cannot override the GDPR Settings controlled by Atlassian.

I hope this information helps.

Regards,

Kristian

Hi Kristian Walker,

thank you for the detailed information.

Regards
Robin

0 votes
David Harkins
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2023

Add the User to an Object Variable (e.g. User) then call:

user.getEmailAddress()

Came across this while working on something similar. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events