When I use the following API call
http://www.example.com/jira/rest/api/2/user?username=f.per@servicerocket.com
I get all the users with a similar email to the one provided instead of the specified user.
In my example, I get these two users instead of the one related to the email
How can I get the specific user using the email address, is it possible?
Thank you in Advance
Hello @Felipe Perez _ServiceRocket_
Firstly, your question is about Jira DC, but you've also tagged your question with cloud and said it's a cloud deployment, which is putting the question in the wrong group and is confusing. Jira CLOUD is not Jira DATA CENTER.
The reason you're getting the results is because the string 'f.per@servicerocket.com' isn't a username, it's an email address.
If you want to search for a user based on their email address, use the Find Users endpoint, as it can search on email addresses
Hi David!
Thanks for the clarification on the tag that has been removed.
Regarding the "Find User" endpoint, I tried but got the same result,
this is my call:
http://www.example.com/jira/rest/api/2/user/search?username=f.per@servicerocket.com
Result:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll correct what you suggested to me and try again. thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sunny Ape
Here is the new corrected question. I also tried what you suggested, but it didn't work. Any ideas?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you are describing with the Find Users endpoint is a known bug that affects the Server / Data Center products. Refer to JRASERVER-72862.
Simply put, you are searching for a user who has an email address with a first part that matches another user's email address.
Either:
1. Do secondary filtering of the results from the endpoint to find the exact match, or
2. Stop using email addresses in user accounts that are identical in their fist part.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.