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:
- Search a user to get his id: -> GET: {{url}}/api/v1/users?filter=profile.email eq "mail@gmail.com"
- From the JSON response, record the “id”.
- Deactivate the user -> POST: {{url}}/api/v1/users/{{id}}/lifecycle/deactivate
- Delete the user -> DELETE: {{url}}/api/v1/users/{{id}}
For a REST API sample, you can use Postman.
- Download and install Postman (its a Google Chrome App).
- Follow the instructions to configure Postman and get an API Key in Okta: https://developer.okta.com/docs/api/getting_started/api_test_client.html
- Go to https://developer.okta.com/docs/api/resources/users.html and click Run in Postman
- Experiment with the search and lifecycle APIs.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.