The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 403 error when calling delete user api

Apurv Rathore
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2024

When calling the api :"https://api.atlassian.com/users/{user_id}/manage/lifecycle/disable", I am getting error 403

 

b'{"key":"forbidden.action","context":{"allowed":false,"reason":{"key":"externalDirectory.scim"}},"errorKey":"forbidden.action","errorDetail":{"allowed":false,"reason":{"key":"externalDirectory.scim"}}}'

 

 

Can you please help

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Marc -Devoteam-
Community Champion
August 7, 2024

Hi @Apurv Rathore 

Are you using the Account ID of the user, this is quite a long number.

Also this is a Cloud only API option.

Do you provide an API key as bearer token for authentication, this is required.

Apurv Rathore
August 13, 2024

Hey @Marc -Devoteam- . Yes I am using account ID of the user, and yes it's a long string.

Yes I am also using API key as bearer token. Other api's such as create account are working, it's just that this particular api is not working.

Could you please help here.

Apurv Rathore
August 13, 2024

I do not understand what this error means

b'{"key":"forbidden.action","context":{"allowed":false,"reason":{"key":"externalDirectory.scim"}},"errorKey":"forbidden.action","errorDetail":{"allowed":false,"reason":{"key":"externalDirectory.scim"}}}'

 

What does this error with key externalDirectory.scim mean, and how do we resolve this issue.

Marc -Devoteam-
Community Champion
August 13, 2024

Hi @Apurv Rathore 

Is you Cloud SSO and a user directory connected?

If so this probably means the user is managed and will only be disabled or deleted if done so in the user directory.

In this case you are no able to delete the user as it's a managed user.

Apurv Rathore
August 14, 2024

@Marc -Devoteam- 

Thanks. Disconnecting Google as Identity Provider, re linking out the domains, and then claiming accounts under verified domains worked.


I had one further doubt. If I pay for Atlassian Gaurd, will using Google for SSO and using some other IDP for provisioning and deprovisioning will be blocked by SCIM setup?

 

Is this true?

Marc -Devoteam-
Community Champion
August 14, 2024

Hi @Apurv Rathore 

I think this could be possible, if the IDP provides provisioning and de-provisioning