REST API returns wrong records when search a project with specific user

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Use REST API to query a project with a specific user, more than one record returns if the user names are similar.

Environment

Jira Software 8.5.10 / Jira Service Management 4.5 - Reached End Of Life

Diagnosis

You may have two users:

  • User1: gw.jo

  • User2: gwaa.joo

Project key: PM

REST API query

1 /rest/api/2/user/assignable/multiProjectSearch?username=gw.jo&projectKeys=PM

Expected result: REST API returns gw.jo's record only

1 [{"self":"<Jira URL>/rest/api/2/user?username=gw.jo","key":"gw.jo","name":"gw.jo","emailAddress":"xxx","avatarUrls":{"48x48":"<Jira URL>/secure/useravatar?avatarId=xxx","24x24":"<Jira URL>/secure/useravatar?size=small&avatarId=xxx","16x16":"<Jira URL>/secure/useravatar?size=xsmall&avatarId=xxx","32x32":"<Jira URL>/secure/useravatar?size=medium&avatarId=xxx"},"displayName":"ABC","active":true,"timeZone":"Asia/Seoul","locale":"en_US"}]

Actual result: REST API returns both user's record

1 [{"self":"<Jira URL>/rest/api/2/user?username=gw.jo","key":"gw.jo","name":"gw.jo","emailAddress":"xxx","avatarUrls":{"48x48":"<Jira URL>/secure/useravatar?avatarId=xxx","24x24":"<Jira URL>/secure/useravatar?size=small&avatarId=xxx","16x16":"<Jira URL>/secure/useravatar?size=xsmall&avatarId=xxx","32x32":"<Jira URL>/secure/useravatar?size=medium&avatarId=xxx"},"displayName":"ABC","active":true,"timeZone":"Asia/Seoul","locale":"en_US"},{"self":"<Jira URL>/rest/api/2/user?username=gwaa.joo","key":"JIRAUSERxxx","name":"gwaa.joo","emailAddress":"xxxx","avatarUrls":{"48x48":"<Jira URL>/secure/useravatar?avatarId=xxx","24x24":"<Jira URL>/secure/useravatar?size=small&avatarId=xxx","16x16":"<Jira URL>/secure/useravatar?size=xsmall&avatarId=xxx","32x32":"<Jira URL>/secure/useravatar?size=medium&avatarId=xxxx"},"displayName":"DEF","active":true,"timeZone":"Asia/Seoul","locale":"ko_KR"}]

Cause

While the cause of this issue is unknown, we were only able to reproduce it in Jira Software 8.5.10  / Jira Service Management 4.5 and both have reached the end of life. We were not able to reproduce it Jira Software 8.22 / Jira Service Management 4.22 and above.

Solution

We would recommend upgrading Jira Software to version 8.22 / Jira Service Management 4.22 or above to resolve the issue.

Updated on March 10, 2025

Still need help?

The Atlassian Community is here for you.