Hello all,
I need to disable 900 Atlassian cloud users, I followed https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-lifecycle-disable-post
I generated the API token for myself and using in a python script to test it, but I am getting error "{"code":401,"message":"Unauthorized"}". I have site admin access as well as directory admin access. I am able to disable the users via Atlassian portal. My token is also showing as valid in portal.
My code:
import requests
import json
url = "https://api.atlassian.com/users/FirstName.LastName@MyCompany.com/manage/lifecycle/disable"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer MyApiToken"
}
payload = json.dumps( {
"message": "Disabling Users who have left Company"
} )
response = requests.request(
"POST",
url,
data=payload,
headers=headers
)
print(response.text)
We cannot, we are not your admins.
Please ask your administrators.
who is my administrators? can you give me a email address of administrators?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, we know nothing about your systems, we're a community of people here to talk Atlassian.
Your best bet is to ask the people around you, maybe the ones who asked you to use Jira, or the one who got you your account.
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.