Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I deactivate a user using the REST API?

Poul Sørensen February 11, 2015

I have tried to PUT to rest/api/2/user?username=xyzzy with  \{ active: false, ... \} , but that does not do the trick.

 

8 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Poul Sørensen February 16, 2015

Well, I found the solution:

deactivating/disablling a user is the same as removing the user from all groups:

DELETE https://.../group/user?groupname=$groupname&username=$username

 

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2016

Removing a user from all groups is not the same as deactivating a user and as noted By Arun Thundyill Saseendran  in another comment on this thread below.  This can cause a security concern if done in this manner, as a user can still receive notification from the system depending on the configuration of the notification scheme, an example is if set to send notifications to assignee or reporter and an issue is updated the and the user is the historical reporter or assignee,  A user needs to be deactivated to block all outgoing notification possibilities, the UI deactivation of a user is covered here:

The ability to Deactivate users via API is being tracked in this feature request:

Deactivating a user at his time is only possible Via the UI

Karthick Jothimani May 23, 2019

When can we expect the API to be in place, we are waiitng to automate the process, so we need API's for Revoking Site access, de-activating and disabling.

Like # people like this
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2019

HI Karthick,

The Feature Request JRA-44801 was moved to the "Waiting for Realease" status just a few days ago so it is coming soon but we do not have an exact timeline. 

As covered in the feature request it does note a tentative timeline:

Hi everyone,

Thank you for your votes and comments on this issue.

After reviewing the issue again we've decided to prioritize it on Jira Server roadmap. Expect to hear an update on our progress within the next 6 weeks.

To read about our recent investments as well as plans for Jira Server and Data Center check out this community post.

Kind regards,

Katarzyna Derenda
Product manager, Jira Server

Regards,
Earl

4 votes
Arun_Thundyill_Saseendran
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.
April 7, 2015

I understand that removing the user from all the groups listed under 'JIRA Users' in 'Global Permissions' virtually deactivates a user and does not consume license. This is possible using REST and was the approach followed.

However, when a user is not deactivated, and if the user has issues assigned, then emails will be send as per the notification scheme. This is the problem I am facing. Hence I need a way to deactivate the user using REST.

Any suggestion is welcome.

2 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2015

Hello,

We have a feature request to add this in, viewable here:

But at the moment it is not currently a callable resource

1 vote
Poul Sørensen February 12, 2015

But that sounds hard to do, as we are using JIRA Cloud at atlassian.net, and we need to synchronize users...

The Atlassian recomended way is to deactivate the user instead of deleting her, for several reasons, one being that it is not possible to delete a user who are assigned an issue.

0 votes
paul grant January 22, 2018

This can be accomplished via selenium:

https://github.com/paulfgrant01/jira-disable-user

0 votes
Rob V November 12, 2015

"You do not have permission to view this request."


get that when i click the JST-166532

0 votes
Rob V October 22, 2015

is this still not possible with the REST API???

when i try and run it i get 

{"errorMessages":["No value found to be changed."],"errors":{}}

 

...yeah, cause you won't let me!

0 votes
Timothy
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.
February 12, 2015

The REST API does not accept that input. You might need to extend and create your own REST API.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events