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
Hi Kristian Walker,
thank you for the detailed information.
Regards
Robin
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.