Forums

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

Managed Accounts - Delete User API

Mike Walsh July 30, 2021

Through the Managed Accounts page, we're able to select users and choose "Delete Account". Is this functionality available via API or available somewhere as an option for bulk users? We have about 10,000 accounts that were inadvertently created. and we would like to remove them.

 

image.png

2 answers

0 votes
Bastian Stehmann
Community Champion
August 3, 2021
0 votes
Claudio Gonzalez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2021

Hi @Mike Walsh ,

Found this information: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-user-delete

I never used this Method, because is experimental but may be work for you. 

Mike Walsh July 30, 2021

From my understanding (and a few tests with it), that API call appears to delete the user from Jira but the user remains under the Managed Accounts for our overarching Atlassian account.

Like Alejandro Martin Lago likes this
Alejandro Martin Lago
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!
April 18, 2023

finally do you got the solution?? 

Mike Walsh April 18, 2023
Temistocles Valdes
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!
March 19, 2024

We were able to implement a workaround using postman interceptor to capture the DELETE request being sent from the web UI and scripted the removal of the managed accounts.  Fortunately the accounts don't need to be deactivated first, you can make the delete request straight away for an active account.

We used the same approach to get rid of dashboards programmatically.

Hope this helps point someone in the right direction.

Petik Vardanyan May 16, 2024

@Temistocles Valdes Hi, could you please tell how u did that ? I tried to achieve the same thing with burp suite , i intercepted the request but it generates jwt token during the deletion process

Steve Goodwin
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!
February 18, 2025

I used Chrome's F12 tools to copy the DELETE request that occurs from the Atlassian Admin Users page as a curl (CMD) which I saved as `jira-del-user.cmd` on my path.

I then edited that file to look like this (I removed much of the `curl` command from here for security/privacy reasons, it's about 17 lines long):

setlocal

set USERID=%1
set ORGID=<your org id>

curl ^"https://admin.atlassian.com/gateway/api/adminhub/um/org/%ORGID%/users/%USERID%^" ^
-X ^"DELETE^" ^
-H ^"accept: */*^" ^

...SNIP!...

After that I exported users as CSV did some text munging using a regex replace Search for `^` and replace with `jira-del-user.cmd `. Giving me several hundred lines looking like:

del-jira-user.cmd 1234deadbeef
del-jira-user.cmd 123456:deadbeef-dead-beef-dead-beefdead

which you can paste into a CMD window.

https://admin.atlassian.com/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events