Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Not able to get the name and emailAddress using USER REST API - get method

Edited


We are trying to get the name and emailaddress on USER REST API based on email Address as search params


API -> https://api.atlassian.com/ex/jira/xxxxx-xxxx-xxxx-xxxx-xxxx/rest/api/3/user/search

I am getting only the following object in the response:


self
accountId
accountType
avatarUrls
displayName
active
timeZone
locale

I don't see the name and also emailaddress as blank in the above response.

How to get the name and emailaddress with the USER REST API with search params for emailAddress or null

 

Also i have another API -> https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get

where in documentation the response is shown as

{
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
"key": "",
"accountId": "5b10a2844c20165700ede21g",
"accountType": "atlassian",
"name": "",
"avatarUrls": {
"48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48",
"24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
"16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
"32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32"
},
"displayName": "Mia Krystof",
"active": false
},


But when we tried to implement, we are not able to see the name and emailAddress.


Kindly help me to get the name and emailAddress using REST API on search condition based on emailAddress.


Regards,
Shiva

1 answer

1 accepted

0 votes
Answer accepted

Google "Jira REST API v3 get user email address"

Hey David,

Thank you. i have tried everything, but no luck.
I need to get name based on the search condition on emailaddress.

Also by default i should see the emailaddress when I hit USER API.

 

Thanks
Shiva.

If you read the articles, you will see hundreds of times where the same answer has been given to the same question.

You can only search based on a user's username or email address, but you will never receive a user's username back from Jira Cloud via the User search endpoints, since that ability was removed from the product in 2019.

As per the documentation:

name

string. This property is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

You will only ever get the user's email address back if it is permitted, as per the documentation:

emailAddress

string. The email address of the user. Depending on the user’s privacy setting, this may be returned as null.

The only endpoint that will transmit email addresses on request is Get user email, but it too is restricted, as per the documentation:

Returns a user's email address. This API is only available to apps approved by Atlassian, according to these guidelines

Connect app scope requiredACCESS_EMAIL_ADDRESSES

Lastly, you asked the same question in this thread and also this one all on the same day!

To triple post the same question across three different sections of the community site is very poor form.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Events near you