Bulk delete users and customers using Postman and CSV file


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

Currently, on Jira Cloud, we can't bulk delete users or portal customers, it would be great if we have the ability to select all users and portal customers that we want to delete and just click on a button instead of selecting each individual one by one. There is a feature request for this implementation without a workaround Bulk delete users

Therefore, the intent of this knowledge base is to provide admins with a workaround to remove users and portal customers in bulk when needed.

Environment

Solution

  1. Download and install the Postman app.

  2. Create an API token that will be needed for Authentication.

  3. Create the CSV file that contains the users or portal customers you want to delete. 

    a) Export users from the user management section. 


    b) Export portal customers from the Jira Service Management section.
  4. Create a CSV file and add the User ids or the usernames of the accounts that need to be removed, a header also needs to be added to the column, this will be used as the variable in Postman.
     

  5. In Postman create a New collection .


  6. Once the collection is created, click on Add a request .


  7. A delete request needs to be created, you will need to add the following API, making sure you change the URL to your instance URL and the variable in between the curly brackets needs to be the one set in your CSV file.
    https://YOUR-SITE.atlassian.net/rest/api/3/user?accountId= {{userID}}
    Also, you will need to set Authorization to Basic Auth and add your user and token and finally Save the request.
     

  8. Click on the 3 dots next to the collection name that was created and select Run collection .


  9. In the Run Order section, we will select the Delete request that was created, and in the Run configuration Data , we will select the CSV file we have created with the users/customers to be deleted. We will see the number of times that the request will run in the Iterations section. Click on Run collection .


    10. In the Summary window you will see all the iterations that have ran and in the Console , you will see the API calls with the ids that were sent. Once this has finished log into the instance and verify that the users and customers have been deleted.



     


Last modified on Mar 21, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.