How to Suspend Multiple Users from a CSV File in Okta Workflows

In this guide:

  1. Okta Workflows guides
  2. Getting users flow
  3. Suspend a user flow
  4. Related Workflows guides
  5. Workflows resources

Okta Workflows guides

Okta Workflows guides are questions and answers from the community office hours, the #okta-workflows channel on MacAdmins Slack, and other places. Read all the other guides.

How to suspend multiple users from a CSV file in Workflows?

This guide will teach you how to suspend multiple users from a CSV file.

The automation has two flows:

  1. Getting users to suspend.
  2. Pass each user to a helper flow to suspend the user.

Getting users flow

The main flow to get users to suspend:

Getting users from a CSV file flow
Getting users from a CSV file flow

This flow has the following steps.

Google Drive – Download File card

This Download File card downloads the CSV file with users to suspend. This is how the CSV file looks:

CSV file with users to suspend
CSV file with users to suspend

Tables – Import from CSV card

Using the Import from CSV card, the flow imports users from the CSV into a Workflows table to process each user. The table looks like this:

Suspended users in a Workflows table
Suspended users in a Workflows table

Table – Search Rows card

The Search Rows card returns all the users in a table and passes them to a List – For Each card for processing.

List – For Each card

The For Each card, calls a helper flow for each user in the list. The For Each card passes the User ID to the helper flow for each user.

Tables – Clear Table card

The Clear Table card, clears the table after the helper flow suspends all the users. With a clear table, the main flow is ready to run again.

Suspend a user flow

This helper flow suspends a user.

Helper flow to suspend a user
Helper flow to suspend a user

The helper flow has the following steps.

On Demand – Helper Flow card

The Helper Flow card defines User ID input for the helper flow. It passes the User ID to the next card, Okta – Suspend User.

Okta – Suspend User card

The Suspend User card suspends the user.

This guide showed you how to suspend multiple users from a CSV file.

Workflows resources

🍫 Get help from Workflows specialists during weekly community office hours.

📺 Learn from Workflows videos.

🛟 Get help from support: discuss a Workflows topic or ask a question.

🙋🏻‍♀️ Get help from the community: join the #okta-workflows channelon MacAdmins Slack.

Leave a comment