Forums

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

No user email at REST API response

Andy Nidodaiev February 2, 2022

I'm trying to parse data with basic auth, using API token from admin account, at our jira workspace. 
So it's looks like this:

GET | https://ourdomain.atlassian.net/rest/api/2/user?accountId=user_acc_id

it shows next JSON in response:

{

"self": "https://ourdomain.atlassian.net/rest/api/2/user?accountId=user_acc_id",

"accountId": "user_acc_id",

"accountType": "atlassian",

"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/....png",
"24x24": "https://secure.gravatar.com/avatar/....png",
"16x16": "https://secure.gravatar.com/avatar/....png",
"32x32": "https://secure.gravatar.com/avatar/....png"

},

"displayName": "Business Analyst",
"active": false,
"timeZone": "Europe/Kiev",
"locale": "ru_RU",
"groups": {
"size": 0,
"items": []
},

"applicationRoles": {
"size": 0,
"items": []
},
"expand": "groups,applicationRoles"
}

And nothing else, where in  docs there is more fields, and email is always shown by default. What I'm doing wrong?

2 answers

0 votes
Guy February 21, 2022

Same challenge here, while using site admin credentials

1. i CANNOT get the email of users outside my org via API (called from outside)

2. but i CAN get all (org and non-org) emails via the "export user" feature of "user management"

Not sure why...

0 votes
Support Team [Clearvision]
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.
February 2, 2022
Andy Nidodaiev February 2, 2022

Thank you for the reply!
I have email visibility "only you and admins" and I'm an admin also. Is there any way to parse JIRA emails only with admin API token? Cause right now, I can only see my email via REST API route, but not others? 
P.S. Other users has different visibility settings, but before I was assuming that if I had admin role - I could parse any data with REST API calls

Like Merge likes this
Support Team [Clearvision]
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.
February 2, 2022

Hi Andy

Does your account email domain match as the same as the user you are trying to see the email of?

Is the user account a managed account or an unmanaged account

Andy Nidodaiev February 3, 2022

All accounts is inside of workspace, but when I'm trying to parse data from this request URL:
https://admin.atlassian.com/gateway/api/adminhub/um/site/<CLOUD_ID>/users?count=20&start-index=1
It shows, that any user from is:
"managedStatus":{"managed":false,"owner":null}
I thought that any user in Jira cloud, that can access tickets is already managed...

Support Team [Clearvision]
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.
February 3, 2022

Hi Andy

No users are only managed users if you have verified the domain that they belong to in your Atlassian cloud instance

https://support.atlassian.com/user-management/docs/what-are-managed-accounts/

https://support.atlassian.com/user-management/docs/verify-a-domain-to-manage-accounts/

Andy Nidodaiev February 4, 2022

We sent verification in jira administration. How do I check in JIRA interface that accounts are managed accounts now?
Does it affects to email fetching with REST API?

Support Team [Clearvision]
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.
February 7, 2022

If an account becomes verified by domain verification they will show in the managed accounts under Directory in admin.atlassian.com 

The managed accounts in id.atlassian.com with have the organisation set in the profile visibility e.g. 

 

contact - email address

org name - Only visible to people who have access to the <org name> organization

which should mean that if your account is in the same org can see the email address of others in the same org

Andy Nidodaiev February 7, 2022

Domain verification didn't affected to email parsing, I still have no emails for users with admin token

Like Guy likes this
Support Team [Clearvision]
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.
February 7, 2022

Hi 

When an account is managed there are 3 options in the users profile for visibility:

1. Only you and admins
2. Organisation
3. Anyone

So depending on what that is set to under the users profiles contact -email address in id.atlassian.com section will determine who can see the email address including from the REST API. 

If set to 1 or 2 an admin should be able to see the email address if querying the API if the account is from the same verified domain. 

One way this wouldn't work is if the domain of the account you are using to query the API is not part of the same domain that's verified

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events