<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
Delete Deactivated Users in Workflows
Workflows
Okta Classic Engine
Okta Identity Engine
Overview
This article describes how to delete deactivated users in Workflows.
Applies To
  • Okta Workflows
Solution

There are two steps and two flows to delete deactivated users:

  1. List deactivated users.
  2. Send the users (via stream records) to a helper flow to be deleted.

 

List deactivated users

 

The list deactivated users flow finds all deactivated users and streams the users to a helper flow. Start the flow on schedule or run it manually via the Run button.

 

List deactivated users flow

 

The flow has the following steps:

  1. The flow uses the Okta—List Users with Search card, with Status set to DEPROVISIONED, to find deactivated users. 
  2. The card uses the streaming option to send records directly to the helper flow.

Streaming records to a helper flow

 

Delete user

 

This is a flow to delete a user.

When using the streaming option, the Helper Flow card must have the following two fields, or the flow will not work correctly.

  • Record (type Object)
  • State (type Object)

 

Delete user flow

 

The helper flow has the following steps.

  1. The Helper Flow card has two inputs: Record and State (both must be Object types).
    • Record: This is the current record passed to this helper flow. The current record has many attributes. For this example, if interested in the user’s ID (type Text), which is passed to the Okta—Delete User card to delete the user.
    • The State parameter passes any additional attributes to the helper flow. Since there is none in this example, it is okay to leave it empty.
  2. The Okta – Delete User card deletes a user using its user ID.

If using the delete action on an active Okta user, the user will be deactivated and a second delete dser action is necessary to delete the user. For more information, please check Workflows docs

 

Related References

Loading
Delete Deactivated Users in Workflows