Related to: API REST /manage/lifecycle/disable and response 401 (you are unauthentificated)
Is there any way to deactivate the unmanaged accounts?
The both Restcalls below are failed:
Welcome to the Atlassian developer community @AhmetKilic,
That’s not a public API. You should not expect that to work for you.
That is a public API but you haven’t given us enough information to know what might be going wrong:
- Did you use HTTP
POST per the documentation on deactivate a user?
- Did you provide the API key as a bearer token in the Authentication header?
- Are you an org admin for your company?
thanks for your quick response.
I would deactivate the unmanaged users.
I was org admin and yes, l provided the API key as a bearer token in the Authentication header.
Atlassian Support let me know that is currently not possible over RestApi. Or do you have any tricks?
Well, who am I to argue with our own support. Except I’m quite confused because this REST API says it does exactly what you want:
Neither of your prior examples had that particular path. Have you tried it?
I’m happy to specify the open questions again here:
- Did you use HTTP
POST per the documentation on [deactivate a user → Yes
- Did you provide the API key as a bearer token in the Authentication header? → Yes
- Are you an org admin for your company? → Yes
Furthermore, I used the following endpoint:
curl --request POST --url 'https://api.atlassian.com/users/XYZ/manage/lifecycle/disable …
Thereby it worked to disable managed user.
When trying to disable unmanaged users I get the above error message from Ahmet.
The Admin REST API documentation (https://developer.atlassian.com/cloud/admin/user-management/rest/intro/#about) also states that only managed users can be customized in an organization.
“Use this REST API to administer and edit the managed accounts in your organization by account ID. You can find the account ID for a user with get users in an organization.”