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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

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...

201 views 1 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