<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Bulk Delete Users via Postman
Okta Classic Engine
Okta Identity Engine
Administration
Overview
This article describes how to bulk-delete users using Postman.
Applies To
  • API
  • Postman
  • User Administration
Solution

Review the steps below or watch this video.


If there is a requirement to delete a substantial number of users from the organization, it can be achieved by utilizing either PowerShell or Postman.

Below are the steps that need to be taken in order to run a Bulk deletion of users via Postman:

  1. A CSV with the user's logins that need to be deleted (note that the users have to be in a "deactivated" state before deleting them. If the users are in any state other than deactivated, a call to deactivate them needs to be run. The call to deactivate a user is

    POST {{url}}/api/v1/users/{{username}}/lifecycle/deactivate )

    • This CSV can be created by running the Okta Password Health Report from the Admin UI (Reports Reports > Okta Password Health Report) and selecting the users that need to be deleted/deactivated.

  2. Create the following call in Postman:

    DELETE {{url}}/api/v1/users/{{username}}

    • Headers:

      1. Key: Content-Type Value: application/json

      2. Key: Accept Value: application/json
        Delete API Call 

  3. Create a new collection in Postman and add only the call needed (deactivate or delete) inside it.

    • Open Postman Runner and select the collection, environment, and iterations (if there are many requests, a delay can be added between calls to not hit the API Rate Limit). The CSV file should look like the one from the screenshot below, and then run the call.
      Run Bulk Delete  
      CSV file 

 

Related References

 

Loading
How to Bulk Delete Users via Postman