Renaming User Fails
Problem:
When trying to rename a user with UserSync, the following message appears:
A User with the same username is present in another directory=(98305:Confluence Internal Directory), further down in the directory search order. 
Due to a limitation in the Atlassian API, we cannot update the user without breaking the user mapping table. 
Please read the following article https://resolution.de/go/user_rename_problem for more details and how to resolve this.
Description:
UserSync renames a user by calling the official Atlassian API. In certain circumstances, this renaming can break the user mapping table inside your Atlassian product, thus destroying associations between tickets/issue/comments with users. 
To avoid this, UserSync does not rename users if the following is fulfilled:
- A user exists with the same username you want to rename the user to. 
- That user is member of a directory below the UserSync directory. 
Example:
- You want to rename the user john@doe.com to john in your UserSync directory. 
- There is already a user john in the internal directory. 
- In the directory order, the internal directory is below the UserSync directory. 
If UserSync would rename john@doe.com to john, the user mapping table will break. As a consequence, all tickets/issues/etc previously assigned to john are assigned to john#1. Additionally, the user john#1 does not exist and cannot be used.
How to Proceed:
As of now, we want to treat those cases individually via our support to avoid any damage to your system. Thus, please open a ticket at resolution.de/go/support and provide the following information:
- The error message as described before, since it already includes information. 
- The directory summary of your Atlassian product. - For this go to User Directories and click Directory Configuration Summary. 
- On the next page, click the download button. 
 
- The content of user mapping table. For that, please choose the specific SQL query for your Atlassian product. It will print the content of the user mapping table: - For Jira: select * from app_user ; 
- For Confluence: select * from user_mapping ; 
- For Bitbucket: select * from sta_normal_user ; 
 
- The current username of the user you want to rename and the new username you want to rename the user to. 
