I use Jira Server 7.6.3, so i try to use this api: https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/user-updateUser.
I want to make user Unactive.
First i get user info via browser: JIRAURL/rest/api/2/user?username=nowakor and copied all response.
"displayName": "xxx [test]",
After that i did this PUT request:
"displayName": "xxx test2",
Name and email has changed but active status hasn't. Do you have any solutions?
The workaround to it is in the get request expand groups and remove the user from all the groups. Especially the JIRA software users groups. With this, the user cannot login and also will not consume a license.
This is the best alternative that worked for me via script.
Let me know if you have any queries.
If this solution works for you, please accept the answer so that it will be helpful for others in the community.
If you look at the scheme for the updateUser endpoint (request scheme) there is no mention of the active flag, which explains why you can't use it. As of now, deactivating a user through the API is not yet possible, it's tracked here: https://jira.atlassian.com/browse/JRASERVER-44801
My suggestion would be to vote for it and watch it. If you're handy with scripts, you could leverage ScriptRunner Script REST Endpoint to build your own (https://scriptrunner.adaptavist.com/latest/jira/rest-endpoints.html).
Best luck with either option!
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events