How to bulk set users to inactive via SQL

Trying to take all users in Internal Directory and set tehm to inactive status, however testign out our SQL it does not seem to make a user inactive. We set active = 0 where user is in directory 1 (internal) for a specific user. We can see the changes take place in the cwd_user table, however I can still login as that user. if I set the user to inactive using the Edit mode in JIRA, I can see in SQL the active flag sets to 0, and I no longer can login as this user. What is missing? I looked at the scheme and we are not seeing where else we need to change to make the user inactive. We have 300+ users in our internal directory we want to force to login with AD, and wish to set all to inactive on internal directory.

2 answers

1 accepted

Hi Mick,

Sorry if my answer seems silly, but just to make sure. Are you restarting Jira after making the changes on the database?

Also, if you want to use AD as primary Directory, you can put the Internal on the second position and the AD on the top. Afetr that you can disable the Internal, this will make all users inside this directory to be automaticaly disabled.

Hi Bruna, thansk for the answer. We had not restarted JIRA, apparantly it caches this data. We do have AD as primary and Internal as secondary, but we want to leave internal running since we have our emergency login if AD goes down, as well as some rest script logins there. Thanks!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,950 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot