Okta Workflows How-To: How to Delete Deactivated Users
Okta Workflows is a no-code platform for automating identity processes. The Workflows team holds weekly office hours 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 hours or post on the community forum.
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 schedule 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 Search card, with Status set to DEPROVISIONED, to find deactivated users.
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.
- 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 page has all the resources to help you get started.
📺 Like learning from videos? Watch Okta Workflows videos.
❓Have a question? Ask during community office hours, post on the community forum, or email me.
🙋🏻♀️ Want to learn from the community? Join the #okta-workflows channel on the MacAdmins Slack.
📖 Want to learn more about identity automation? Take Workflows training on Okta Learning.