- API
- Postman
- User Administration
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:
-
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.
-
-
Create the following call in Postman:
DELETE {{url}}/api/v1/users/{{username}}
-
Headers:
-
Key: Content-Type Value: application/json
-
Key: Accept Value: application/json
-
-
-
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.
- 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.
Related References
