Importing users from Confluence to Jira

Kevin Barker July 31, 2012

We have been running a Confluence wiki for about a year, using the internal user directory serving approximately 200 user accounts. We are now considering adding Jira into the mix, but would really like not having to recreate our user accounts manually one by one. We know about Atlassian Crowd, but feel it's probably overkill for our needs.

Is there an automated way to import our Confluence user directory into Jira so we can use Jira as the shared user repository?

5 answers

1 accepted

0 votes
Answer accepted
Kevin Barker October 10, 2012

I managed to do something like what I was after, using a combination of the Atlassian CLI tools and some plain SQL queries. The Atlassian CLI tool for Jira has an "addUsersWithFile" action which imports users from a CSV file in the format:

user_name,password,email_address,display_name,group[,group[,group...]]

So I kludged together some SQL queries in a bash script to extract the necessary user info from the Confluence database and output it in the required CSV format, then used the Jira import action to add the users. This seems to have worked, inasmuch as I can see that the users and groups have imported, and all users can login to Confluence using the Jira User Directory for authentication. This method doesn't retain the original user passwords so all users need to reset their login, but that's not too onerous.

Note that having multiple user directories configured (e.g. Jira User Directory and Confluence Internal Directory) requires that you don't have the same username in both directories. So after transferring the users using this method, you need to either disable the Internal Directory in Confluence, or alter all the original usernames in the Confluence Internal Directory database so they don't clash with the newly created users in the Jira User Directory. (I manually updated the Confluence database appending ".conf-directory" to the usernames in the Internal Directory).

We're still in the testing phase of this, but it seems to have achieved what we were hoping for.

0 votes
Brendan Patterson
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.
March 18, 2014

Hi! The Bulk User Upload AddOn makes it single click easy to export your Confluence users to a CSV file.

- Brendan

0 votes
Alejandro Conde Carrillo
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.
March 3, 2013

There is a third party plugin called Confluence User Export which should allow you to migrate your users from Confluence to JIRA. I haven't tryed it yet though.

0 votes
Kevin Barker August 29, 2012

Hi. Thanks for your answer.

Yes, using JIRA's user management is exactly what I am after. It's getting our existing Confluence user database into JIRA's user directory that is the problem...

I had seen the page you quoted and have tried those migration tools, but I get an error as it tries to import the very first user. I guess those tools were written for Confluence 3.4, so things could easily have changed in the API since then. And unfortunately the tool only contains java class files, not the source .java files, so I can't dig around in the code to try to fix it.

RianA
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.
August 29, 2012

Hi Kevin, by default It won't pull Confluence user into JIRA user directory as far as I know. All of them will be stored under cwd_user table though. However the mapping will be different, as it has different user directory. May I know where did you get the information that the Confluence user database to JIRA user directory?

0 votes
Harry Chan
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.
August 28, 2012

Hi, you can use JIRA's user management, which is in a way an embedded Crowd. You can look at following https://confluence.atlassian.com/display/CONF34/Migrating+users+from+Confluence+to+JIRA to get this done. Be sure to test it first in a test environment.

Suggest an answer

Log in or Sign up to answer