Bulk delete users and customers using Postman and CSV file

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

Summary

On Jira Cloud, at the moment, we can't bulk delete users or portal customers via user management. The intent of this article is to provide admins with a workaround to remove accounts in bulk.

Configure Postman to bulk delete accounts

  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. 
    The Atlassian administration panel showing the Users page. The left-hand navigation menu highlights the Users section under USER MANAGEMENT. The main panel displays a list of users, their last activity, status, and available actions such as Show details or Resend invite. Buttons for Invite users and Export users are also visible at the top right. A search bar is present just below the page title.

    b) Export portal customers from the Jira Service Management section.
    The Atlassian administration panel displays the Portal customers page within Jira Service Management. The left-hand navigation menu highlights Jira Service Management. The main panel lists portal customers, showing their last activity as Never logged in, status as Active, and provides the action Edit full name for each. An Export customers button is located at the top right. A search bar labeled Filter by is also present. A brief explanation above the customer list describes that portal customers access the site through customer portals and are managed within service management projects. A link to View service management projects is also provided.
  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 .
    A Postman workspace displaying a new collection titled New Collection. The left sidebar shows various options like Collections, APIs, Environments, Mock Servers, Monitors, Flows, and History. The main panel displays the Authorization tab for the new collection, with No Auth selected as the authorization type. Tabs for Pre-request Script, Tests, and Variables are also visible. At the top, buttons for New, Import, and several existing requests are shown, along with options to Share, Fork, Run, Save, and access Documentation. The Collections menu in the sidebar lists New Collection and DatDriven.

  6. Once the collection is created, click on Add a request .
    A Postman workspace showing an empty collection named Testcollection. The left sidebar lists options such as Collections, APIs, Environments, Mock Servers, Monitors, Flows, and History. The main panel indicates that the collection is empty and prompts the user to Add a request to begin populating it. DatDriven is also listed as a collection. Buttons for New and Import appear in the top right.

  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.
    Postman showing a DELETE request setup with Basic Auth, ready to be sent. 

  8. Click on the 3 dots next to the collection name that was created and select Run collection .
    Postman context menu for a collection, with the Run collection option highlighted.

  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 .
    Postman Collection Runner interface, configured to run Testcollection with data from users.csv three times.

    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.
    Postman Collection Runner results showing three successful DELETE requests with 204 No Content responses. The console displays the full URLs used in each iteration.

Last modified on Feb 13, 2025

Was this helpful?

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