Importing users from Confluence to Jira

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
Accepted answer

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:


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.

Hi, you can use JIRA's user management, which is in a way an embedded Crowd. You can look at following to get this done. Be sure to test it first in a test environment.

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.

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?

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.

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

- Brendan

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,959 views 19 22
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you