Duplicate users found using RestAPI but cannot find them in UserManagement

Patrick Vijgeboom May 16, 2022

Hello. I found more than 22 duplicate accounts of which there are a few each time in LDAP and Jira Internal Database. When I want to look them up in the User Management database, I only see one user each time. Any idea how this can happen?

2 answers

0 votes
Dawid Joshua [TechTime]
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.
May 23, 2022

Hi Patrick, 

It is possible to have the same user in multiple user directories. In your case, you seem to have the same user in Jira Internal Directory and in Delegated LDAP Authentication.

When you have multiple directories, you can define the order of these directories. This determines which directory Jira will search first (in your case LDAP) when looking for user information (see: https://confluence.atlassian.com/adminjiraserver/configuring-user-directories-938847049.html). Once Jira finds the user, it will not search for it in the following directories. 

I highly recommend this article: https://confluence.atlassian.com/adminjiraserver/managing-multiple-directories-938847057.html

So how to solve this?

If you want to edit the internal user account, one option is to temporarily change the directory order and search for the duplicated users. It's very likely that these 22 users will not be able to log in during this period, so please be careful. Another option could be to install User Management for Jira (https://marketplace.atlassian.com/apps/1215285/user-management-for-jira?tab=overview&hosting=datacenter) on a trial license and perform a bulk operation for these users with filter set to only in Internal Directory. 

0 votes
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2022

@Patrick Vijgeboom, could you please provide some additional details about what you are experiencing?

 

Are you saying that you've found duplicate email addresses, duplicate user names, both? Where are you seeing the duplicates, and where are you seeing the single user?

Patrick Vijgeboom May 18, 2022

I found the duplicates with the following curl of its equivalent URL.

curl -X GET "<BASE_URL>/rest/api/2/user/duplicated/list" \
  -u "<USERNAME>:<PASSWORD>"

 For example I found:

{"directoryId":1,"directoryName":"Jira Internal Directory","userActive":true}],"<USERNAME>":[\{"directoryId":10001,"directoryName":"Delegated LDAP Authentication","userActive":true},\

I did a search on in UserManagement but I find only the LDAP account but not the JID account.

Patrick Vijgeboom May 18, 2022

@Kian Stack Mumo Systems I forgot to mention you :-)

Suggest an answer

Log in or Sign up to answer