Mass deletion of accounts

Is it possible to remove (delete) accounts in mass… I have a task to remove 100’s of accounts and while i know i would have to inactivate them then delete them it is not in anyway a good use of anyone’s time to sit and do them one at a time. Does anyone have an example of how to do this?

You can use the REST APIs for that.
Here’s how you will do that:

For each user:

  1. Search a user to get his id: -> GET: {{url}}/api/v1/users? eq ""
  2. From the JSON response, record the “id”.
  3. Deactivate the user -> POST: {{url}}/api/v1/users/{{id}}/lifecycle/deactivate
  4. Delete the user -> DELETE: {{url}}/api/v1/users/{{id}}

For a REST API sample, you can use Postman.

  1. Download and install Postman (its a Google Chrome App).
  2. Follow the instructions to configure Postman and get an API Key in Okta:
  3. Go to and click Run in Postman
  4. Experiment with the search and lifecycle APIs.