How to Move a User from one Delegated User Directory to another Delegated User Directory
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
This article outlines the procedure and consequences of transferring a user between directories in a Jira environment that employs multiple delegated user directories. It focuses on the situation where such a transfer leads to duplicate entries in the cwd_user table, offering practical advice on how to manage these records efficiently.
Environment
The Jira environment features multiple delegated user directories that facilitate user management.
The Jira environment features a range of directories, such as Delegated Directories and Internal Directories, which make use of LDAP authentication to ensure secure access.
The order of directories really matters here. First, mention the directory you plan to remove, followed by the directory of the target user.
The database table in question is cwd_user.
Diagnosis
When a user is moved from one delegated user directory to another on the LDAP side, two entries for that user will appear in the cwd_user table within the system. Each entry corresponds to a distinct directory_id, signifying that the user is represented in both the old and new directories.
You can execute the following query:
1
Select * from cwd_user where lower_user_name = '<username>';
Cause
The duplication arises when a user is reassigned from one directory (for instance, Directory A) to another (such as Directory B). In this process, the system generates a new record for the user in the new directory while preserving the existing record in the previous directory. Consequently, this leads to the existence of two records for the same user, each linked to different directories.
Solution
Begin by navigating to the User Management section of your system.
Locate the user (for example, User A) who has been relocated.
Click on the user to select them, then access the options menu, which is represented by three dots (...).
From the menu, select the 'Delete' option to eliminate the user record linked to the previous directory (e.g., User A -> Directory A).
When prompted, confirm the deletion. The system will then display a message confirming that the record for User A in Directory A will be permanently removed.
After performing the deletion, please confirm that the user has only a single entry in the cwd_user table that corresponds to the new directory (e.g., User A -> Directory B).
This process guarantees that each user is accurately represented within the system through a single directory assignment. This approach not only streamlines user management but also upholds data integrity across all directories.
Was this helpful?