Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Call to /api/2/group?groupname=<name>&expand=users no longer returns email address

Matt
Contributor
July 12, 2019

Hi All,

We use api/2/group to validate certain information about members of a group, including the domain of their email address.

The cron has worked happily until two days ago when it no longer returns "emailAddress" in the JSON.

I searched around for inspiration (I assume it's a security change) but can't find details of the change, or whether it's still possible to get the email addresses of users in a group.

Any inspiration you can provide would be much appreciated!

2 answers

1 accepted

1 vote
Answer accepted
Aleksandr Zuevich
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.
July 23, 2019

Hi Matthew,

Here is what I've figured out: 

New profile visibility control settings are launched which allow users to hide or unhide parts of their Atlassian Account profile (https://id.atlassian.com/manage-profile/profile-and-visibility). The default value for email address visibility is "Only you and admins". So emails are not visible for users who have not changed default visibility settings.

Matt
Contributor
July 24, 2019

That's brilliant, thanks for digging this out Aleksandr.  That's enabled me to get to a point where I can retrieve the information for people within my own organization, I just now need to figure it out for users who we invite in from customer organizations.

Thanks again for your help! 

1 vote
Aleksandr Zuevich
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.
July 12, 2019

Hi Matthew,

According to Jira cloud REST API documentation (https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-group-GroupsGET /rest/api/2/group is deprecated. Could you try group/member?

Matt
Contributor
July 12, 2019

Many thanks Aleksandr!

That's very useful to know, I should have checked.  I've amended the job to use group/member and I'm still getting the same fields back:

{
"self": "",
"name": "",
"key": "",
"accountId": "",
"avatarUrls": {},
"displayName": "",
"active": ,
"timeZone": "",
"accountType": ""
}

The documentation suggests this should bring the emailAddress back so this must be a setting somewhere else.  I assumed this must be a security setting but the only one I can find is 'User email visibility' which has no effect.

I'll keep digging.

Aleksandr Zuevich
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.
July 12, 2019

Yea, I've tried even the old deprecated endpoint and got emails in the result at my cloud instance...

Like Matt likes this
Matt
Contributor
July 12, 2019

Thanks again Aleksandr for your efforts.  Much appreciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events