API to disable user not working despite admin privileges

We are trying to build an API call to disable a user’s Atlassian account. Despite the fact that the API token belongs to a user with admin privileges, however, the response returns {“code”:401,“message”:“Unauthorized”}. The API documentation here:

https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-lifecycle-disable-post

states that we need a lifecycle.enablement privilege, however, we are unable to locate where or how exactly we can enable this.

1 Like

Trying to do the same thing. Receiving the same error. I even tried to do something way simpler to simply fetch orgs which doesn’t require any privilidges

Example of what I’m executing:

curl --location --request GET ‘https://api.atlassian.com/admin/v1/orgs
–header ‘Authorization: Bearer (my bearer here) from MyTokens’
–header ‘Accept: application/json’ \

1 Like

Did you solve this problem?

Hello Timofei,

Yes I did, what I did is I used the network inspector in Google Chrome and just recorded the request when I click the button. I copied it with cURL and pasted into Postman.

That was the only way to make it work. I don’t remember exact details of the edits that I made afterwards. I hope this helps you!