Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to deactivate Users in bulk?

Mona July 1, 2020

How to deactivate Users in bulk?

 

 

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
July 1, 2020

@Mona do you have some add-ons which could help with it? For example ScriptRunner?

Mona July 1, 2020

Using JIRA Server. Is it possible without an Add-on

Martin Bayer _MoroSystems_ s_r_o__
Community Champion
July 2, 2020

You can use also REST API (https://docs.atlassian.com/software/jira/docs/api/REST/8.10.0/#api/2/user-updateUser) to deactivate user.

You could call it from your browser, but I don't know if you are technically skilled to write simple javascript piece of code... in general, it could look like

var usernames = ['testuser'] // you have to put user names into array
for(var username in usernames){
username = usernames[username]
var requestData = {active: false}

//invoke rest api to deactivate user

$.ajax({
contentType: 'application/json',
url: '{base_url}/rest/api/2/user?username='+username, // you have to replace {base_url} with real jira base url
type: 'PUT',
data: JSON.stringify(requestData)
});
}

I tried to test it on changing display name for user (because my running Jira is of old version and its rest api does not allow changing activity status of user).

You must be logged in as jira-administrator in browser.

Good question is, what is your instance's version?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events