<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
0D5KZ00001LCqdL0ATOkta Classic EngineDirectoriesAnswered2026-01-18T09:00:48.000Z2025-09-03T18:21:41.000Z2025-09-05T20:41:52.000Z

yc954 (yc954) asked a question.

What is the process to bulk delete users from OKTA based on a group using the API?

We are trying to remove users who were added to a group. Is it possible to remove users from a group using a single API call, without using any script?


  • TimL.58332 (Workflows)

    @yc954 (yc954)​  -- Each removal is a separate Deactivate then Delete call. So essentially you need to grab an array / list of users from the group then process each one with the required 2 calls. You can potentially leverage an Event Hook so each time a new user is added to the group a hook fires and sends their information to an HTTPS destination (such as Okta Workflows) to process them out.

    Expand Post
  • RohitU.50441 (Trevonix)

    @yc954 (yc954)​ 

    You will have to do this via script. The APIs available for user assignment to group and removal are operated per user.

  • BrandonB.06003 (Customer)

    no you will have to get a list of users you want to delete, grab their oktaUUID or username and then loop through and call /api/v1/users/${userId}/lifecycle/deactivate for each one. if you want to completely delete them youll need to call that endpoint twice for each user

Loading
What is the process to bulk delete users from OKTA based on a group using the API?