You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add the User to an Object Variable (e.g. User) then call:
user.getEmailAddress()
Came across this while working on something similar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.