@KarimCHERIFI,
That’s frustrating. Maybe we can isolate the problem by checking results from other endpoints.
First, let’s make sure we can get a valid account id. Using a Jira API token, we get current user using GET /rest/api/3/myself
. For me, the result is 200 OK
and looks like:
{
"self": "https://devpartisan.atlassian.net/rest/api/3/user?accountId=557057:3d0e64ae-35d3-490d-b6d9-d81c981476d0",
"accountId": "557057:3d0e64ae-35d3-490d-b6d9-d81c981476d0",
"emailAddress": "ibuchanan@atlassian.com",
"avatarUrls": { ... },
"displayName": "Ian Buchanan",
"active": true,
"timeZone": "America/Chicago",
"locale": "en_US",
"groups": { ... },
"applicationRoles": { ... },
"expand": "groups,applicationRoles"
}
Next, let’s take that accountId
and use it with the Atlassian-wide APIs. This time we need a different admin API token. We can get profile for this user with GET /users/{account_id}/manage/profile
. In my case, that’s https://api.atlassian.com/users/557058:641a59a4-008c-4cb5-b4eb-760303859b97/manage/profile
. In my case, the result is 403 Forbidden
because Atlassian manages the identity for ibuchanan@atlassian.com
. And, the error message tells me that I’m not an admin for Atlassian:
{
"key": "forbidden",
"context": "Error: Caller must be a verified org admin of targeted account or be the targeted account",
"errorKey": "forbidden",
"errorDetail": "Error: Caller must be a verified org admin of targeted account or be the targeted account"
}
@KarimCHERIFI since you just set up a domain, claimed the users, and are managing the users with Access, I assume you are also an admin. If not, you will have the same 403 error. You must be an admin to manage users. If you are still getting a 401, even for your own accountId
, then please refresh your admin token. Revoke the one you are using, and generate a new one.
Once you can see your own account profile from the user management API, then we can take the last step and try to disable with a different account ID.
Let me know if that helps you diagnose the problem.