I want to run the Get Users in Organization REST API to get the account ID and email address of a user in my organization.
I would like to get at least the account ID and email address when executing the REST API, but the description of Responses → UserPage → data → email in the REST API manual below says "The email address of the user. If the user has restricted visibility of the email address, the property will be absent" https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v1-orgs-orgid-users-get
With the above REST API, I have confirmed that even a user whose email address is open to "only you and the admins" can get an email address, but under what conditions can't I get an email address?
Hello @Y.Miura
"I have confirmed that even a user whose email address is open to "only you and the admins" can get an email address, but under what conditions can't I get an email address?"
It's a common misunderstanding as the documentation doesn't make it clear. That 'Share email address with only you and admins' setting is for users to shares their email address with the admins via THE GUI ONLY, it has no effect on sharing their email address with admins, or anyone else, via THE REST API.
To be able to lookup a user's email address via any REST API endpoint in Jira Cloud, that user must have 'Share email address with everybody' enabled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.