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?
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 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.
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?
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
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!
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