Okta Workflowsopens in a new tab is a no-code platform for automating identity processes. The Workflows team holds weekly office hoursopens in a new tab during which they answer builder questions.
This blog post helps you get started with Workflows. Okta support does not assist with custom flow construction using this guide, as it falls outside the scope of standard support. You may need to adjust the flow(s) to meet your needs. For questions, attend community office hoursopens in a new tab or post on the community forumopens in a new tab.
This blog post is based on a question during office hours: How do you delete deactivated users in Workflows?
Delete deactivated users in Okta
There are two steps and two flows to delete deactivated users:
- List deactivated users
- 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. You can start the flow on scheduleopens in a new tab or run it manually via the Run button):

List deactivated users flow.
The flow has the following steps:
- The flow uses the Okta—List Users with Searchopens in a new tab card, with Status set to DEPROVISIONED, to find deactivated users.
The card uses the streaming optionopens in a new tab 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 optionopens in a new tab, 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.
- 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, you are 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 you don’t have any in this example, it’s okay to leave it empty.
- The Okta – Delete User card deletes a user using its user ID.
Note: If you use the delete action on an active Okta user, the user will be deactivated, and a second delete action is necessary to delete the user.
Okta Workflows resources
🚀 New to Okta Workflows? The Getting Started with Okta Workflows pageopens in a new tab has all the resources to help you get started.
📺 Like learning from videos? Watch Okta Workflows videosopens in a new tab.
❓Have a question? Ask during community office hoursopens in a new tab, post on the community forumopens in a new tab, or email me.
🙋🏻♀️ Want to learn from the community? Join the #okta-workflows channelopens in a new tab on the MacAdmins Slack.
📖 Want to learn more about identity automation? Take Workflows trainingopens in a new tab on Okta Learning.
