How to migrate user from Remote JIRA Directory to Confluence Internal Directory ?
Asked by QuentinB:

I need to move the Confluence server and it will not be able to reach the JIRA server anymore. So I need a way to migrate user from Remote JIRA Directory to Confluence Internal Directory :)  

I'm able to run SQL query to retrieve user list and group from database.  
But there is not rest API call to create user in Confluence ...  

Does anyone know a good way to achieve this ?  

Thanks !


Answers:
author: Igor M.
body: Hello,

If a user with the same username exists in the local and external user directory, they will be merged. So in your case, you can create a user manually with the same username in the local directory and that user will have the same content access as remote Jira user.

To do that you have to make sure you have a working local administrator account too, to avoid losing access when **Jira External Directory** is no longer reachable:

1. Go to **Cog \> General Configuration \> User Directories**
2. With an Arrow move **Internal Directory** to the top
3. Go to **Users** , locate your Admin account, and make sure it shows as **Directory:** **Confluence Internal Directory** when you open it
4. If it shows **External Jira Directory,** create a new account with a unique username and add it to **confluence-administrators** group, as **Internal** Directory is primary, this user will be automatically created in the internal directory.
5. Check your user in question, to see if it is listed as **Remote Jira Directory**
6. Go back to **User Directories** and disable **Remote Jira Directory**
7. Go back to **Users** and create a new user, but use the same username and details as the user has in **Remote Jira Directory**.
8. Go back to **User Directories** , re-enable **Remote Jira Directory,**and mover it back to top.

Now you should have the same user in both directories and if you ever lose access to Jira or remove it, local user will remain.

Regards,

Igor

comments: author: QuentinB
body: Thanks a lot for your help.  
I will only ask user to reset password I think ...


author: Igor M.
body: Good idea, you can set a temporary password and user can then set his own when logged in. Keep in mind that if Jira Directory is still online and primary, the password reset will happen on Jira directory.


author: Shari Barchus
body: Hi Igor,

Thanks for the reply here - great topic! I do wonder though, in your step #8, why do that step if the goal is to no longer use the remote Jira directory?

Also, at what point does Confluence associate the end users' associated Confluence data (pages,comments, perms, etc.) with that new user entry in the Internal Directory. Does it update Confleunce's own DB at the next login, or on restart?


author: Felix Bravo
body: I have the same question


author: Steve Bates
body: Is the user account still reliant on the Jira directory for group membership and page permissions ? or would these still work with the Jira directory gone?


author: Bipin Nepal
body: HI [@Igor M_](/t5/user/viewprofilepage/user-id/1169056) is there a way to do this in a bulk , we have tooo many users and doing this manually is too hectic, if there is any please share


Tags: confluence-server

server