How to unfederate Jira users using sql statements only On-Prem Jira

daniel.laska January 22, 2019

At the moment, my on-prem Jira has users authenticating via LDAP.

I would like to move these users off LDAP and to the Internal Jira. I don't have the migration option under the "User Directories > Additional Configuration & Troubleshooting" as mentioned in the documentation.

I am trying to unfederate them using a database script. I tried the following updates to set the user's directory to "1" (our internal directory id) and the credentials to a hash of a known password.

update cwd_user set credential='<myhash>',  directory_id = 1 where user_name='<username>';

 update cwd_membership set parent_id = <internal Jira group>, directory_id = 1 where child_id = <user id> ;

 update cwd_user_attributes set directory_id = 1 where user_id = <user_id>;


But I'm sure there's something else because when I tried to log in the logs said

com.atlassian.crowd.exception.runtime.UserNotFoundException: User <user_name> does not exist
    at com.atlassian.crowd.embedded.core.CrowdServiceImpl.setUserAttribute(CrowdServiceImpl.java:413)

What else should I be updating?

1 answer

1 accepted

0 votes
Answer accepted
daniel.laska January 22, 2019

Got it to work! I actually only needed to restart Jira!

Suggest an answer

Log in or Sign up to answer