Disabling multiple users in bulk - using REST?

Rahul Aich [Nagra]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2014

Is there a way to disable say 100 users (on jira) at one go, instead of going into each profile and disabling him one by one.

PS: JIRA6 has the disable user checkbox.

Can we use REST API to do bulk disabling?

Rahul

3 answers

2 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2014

updateUser from JIRA Command Line Interface can be used in combination with one of the run actions like runFromSql, runFromCsv, or runFromList. This can be done on a live system.

1 vote
codelab expert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2014

The GUI has no option for doing this in a bulk operation.

The fastest way to solve this issue is:

1. Connect to your JIRA database

2. Search for table [dbo].[cwd_user]

3. Select all relevant users and set the value in column "active" to "0"

BenjiI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2014

Make sure the database is shutdown when doing this operation :)

Daniel Varela Santoalla April 25, 2016

Well, I suppose you mean that JIRA is shut down. Might be a tad difficult to change a value in a database that is not running wink wink

Like Cesar Lombao likes this
0 votes
BenjiI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2014

Hi Rahul,

This thread gives an overview of some (safe) options to deactivate users:

https://answers.atlassian.com/questions/127643/how-to-deactivate-a-user-programmatically-java-rest-sql

Suggest an answer

Log in or Sign up to answer