Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

The following email address retrieved more than one active user in this Jira instance

Deleted user Jun 11, 2019

In a Jira server (using Crowd) the users are managed with Active Directory.

When I perform this REST GET call via the browser

https://jira.myserver.dom/rest/api/2/user/search?username=username@domain.dom

I get the expected answer, but if I perform the same call via Java code I get the following error:

The following email address retrieved more than one active user in this Jira instance: username@domain.dom

Any idea of where this error message is coming from?

Thanks

Francesco

5 answers

1 accepted

Not sure if you are, but if you are looking to retrieve only one user, you may be better off using "Get user" (https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/user-getUser), rather than the search method.

i.e. https://jira.myserver.dom/rest/api/2/user?username=username@domain.dom

Edit: Looking at your response to another answer, looks like you are looking for multiple results. In that case, that error doesn't look like a Jira error to me, is it possible it's something in the code?

FYI...

Multiple users per email address can lead to some confusion. When you use the Jira feature to create or comment Jira issues from an email account, the code that polls the email inbox to read incoming messages and create or comment Jira issues, makes some assumptions based on email addresses. For example the message to Jira is normally addressed to "jira@abc.com" or something like that in the message "to" field, but, a "cc" field can be configured to become the assignee of an issue created from an email.

When that is done the assumption is that the first matching email address returned from a directory is the match for the assignee. When there are multiple users with one email address this can look kind of arbitrary and/or can end up being "not what was intended."

Anyway it is a subtle feature that can take some time to troubleshoot.

0 votes
Sean Yates Yates
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Oct 30, 2023

You have the option to register an account with a distinct username even if you use the same email address. Scratch Geometry Dash

0 votes
Randall Robertson
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.
Oct 04, 2019

Are you asking why calling the API via the browser responds differently than calling it from code?

0 votes
brbojorque
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 19, 2019

Hmm, the email address is not unique in Jira, it means that you can register an account with a unique username but the same email address.

I assume that the API is returning the latest entry and it is supposed to return only one entry.

Deleted user Jun 24, 2019

Yes you're right, the email address is not unique in Jira server.

I have then created more that one user with the same email address but I get the whole list of users without any error when using

https://jira.myserver.dom/rest/api/2/user/search?username=username@domain.dom

I don't know how to test if it can be somehow related to the Crowd/AD integration

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events