Problem : I need to be able to find user in JIRA On Demand based on their email address.
I googled but couldn't find any relevant answer.
I checked JIRA Rest API guide and was thinking about using this "/rest/api/2/user/search" but i can't get it to work since the query still require username, and it wouldn't make sense to put user's email address as username
Any tips or recommandtion would be appreciated.
Community moderators have prevented the ability to post new answers.
Hello Everyone,
We have a quick update about this thread:
Due to the implementation of the new European General Data Protection Regulation (GDPR), the parameters used to identify users in REST API as "username" and "userKey" were replaced by the Atlassian account ID (accountId).
You can find more information regarding this change in the documentation below:
That being said, you must specify the accountId in the REST API to return your users on your Jira Cloud site:
GET /rest/api/3/user?accountId=xxxx
You can also search for the user's e-mail with the following API:
GET /rest/api/3/user/search?query=<e-mail>
To know the Account ID of multiple users by their usernames, you can use the experimental Endpoint below:
GET /rest/api/3/user/bulk/migration?username=xxxx&username=xxxxx
Greetings,
Petter Gonçalves - Atlassian Community Support
That is the correct call. It allows you to search by username, email address or name. The parameter is called username. You will need to check the result set to make sure the name or username was not matched.
https://docs.atlassian.com/jira/REST/latest/#d2e503
username |
A query string used to search username, name or e-mail address |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That does not seem to work. I am trying to use the Rest API with our on-demand instance. If I use the parameter username=bchoate it works and will return my user record. If I use username=bchoate@wikia-inc.com it returns an empty array. In the case where I am using email the email string is getting properly url encoded before sending.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can retrieve user information using email too.
/rest/api/2/user/search?username=email@gmail.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on another question I started messing around with "User email visibility". If set to public or logged in users only, then the API returns results if queried using an email address. If it's set to hidden, then you get nothing, not even an error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I changed User email visibility to Public but still could not see EmailAddress of user
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I am trying to fetch user list using my java code. But unable to fetch. If I try using chrome browser, I am able to get the json response.
{baseurl}/rest/api/2/user/search?username=sam
Please suggest.
Regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I agree with Brian, this api doesn't work with email address. is there any solution for this one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.