unable to delete user through API as Organization Admin

Rabbit Stoddard
Contributor
November 8, 2021

Hello, 

I'm an organization admin for my org, and I need to clean up some duplicate accounts that were created by an improper AD sync . I'm running the following: 

 

$ curl --request DELETE \
> --url 'https://<myorg>.atlassian.net/rest/api/3/user?accountId=<acctId>' \
> --user 'email:token'

and getting the following error:

{"errorMessages":["Specified user does not exist or you do not have required permissions"],"errors":{}}

I've verified that the user is there, and that I have permissions for this- I can also do this sucessfully from the UI, but as I have a lot to go through, I'd rather use a script. Any ideas?

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2021

I don't see that deleting users via the user management api is allowed, referencing this page:

https://developer.atlassian.com/cloud/admin/user-management/rest/intro/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events