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.
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.
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