You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
What is the process to disable a user via the API?
Thank you.
Best regards,
Hi @Fernando André ,
you can follow Atlassian documentation to disable a user with the API : https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-lifecycle-disable-post
Let me know if this helps,
--Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fernando André ,
this is the Server documentation : https://docs.atlassian.com/software/jira/docs/api/REST/8.3.0/#api/2/user-removeUser
Keep in mind that this features is only available from Jira 8.3.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alexis Robert ,
I need your help as am new to JIRA Cloud.
Could you please explain the step-by-step process that how to disable bulk users via the API?
Regards,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Running a Jira Server 8.13.6 I implemented a script that Disables the user, the script works fine, the commands get the responses OK and the "Active" state of the user is changed - every thing is fine there.
The strange thing is that when attempting to edit the Details of the User in the GUI - the "Deactivated Checkbox" is not ticked!
The user is inactive, and is not able to log in.
Appears to be a bug in the GUI? Will post question in forum also.
RTFM: Everything works as expected - it says "Active" not "Deactivated"....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is my python code to do it:
import urllib3
import requests
import json
from requests.auth import HTTPBasicAuth
url = f"https://yourdomain.com/rest/api/2/user"
auth = HTTPBasicAuth("user", "password")
headers = {"Accept": "application/json", "Content-Type": "application/json"}
params = {"username": "jack"}
payload = json.dumps( {"active": False} )
requests.request("PUT", url, data=payload, params=params, headers=headers, auth=auth, verify=False)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Rafael Costa
I spent a while toying with jira python library - but that got me no where. Your example worked perfectly for me on Jira Data Center 8.20.
Appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.