How to Suspend Multiple Users from a CSV File in Okta Workflows
Last Updated:
Overview
This article demonstrates how to suspend multiple users from a CSV file. Suspending multiple users from a CSV file requires creating an Okta Workflows automation with a main flow and a helper flow. The main flow downloads the CSV file, imports the users into a table, and passes each user to the helper flow to execute the suspension.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Workflows
Solution
Complete the task by creating two flows for the automation: a parent flow to retrieve the users and a helper flow to suspend each user.
How is the parent flow configured to retrieve users?
Configure the parent flow to download the CSV file, import the data into a table, and iterate through the users.
Build the main flow by adding the necessary cards to download the file, process the data, and clear the table for future runs.
- Add a Google Drive Download File card to download the CSV file containing the users to suspend.
Review the downloaded CSV file containing a list of users designated for suspension.- This is how the CSV file looks for this example:
- This is how the CSV file looks for this example:
- Add a Tables Import from CSV card to import the users from the CSV file into an Okta Workflows table.
Review the Okta Workflows table storing the imported user data for processing.- The table looks like this:.
- The table looks like this:.
- Add a Table Search Rows card to return all users in the table and pass them to a List For Each card.
- Add a List For Each card to call a helper flow for each user in the list and pass the User ID to the helper flow.
- Add a Tables Clear Table card to clear the table after the helper flow suspends all users, preparing the main flow for the next run.
How is the helper flow configured to suspend users?
Configure the helper flow to receive the user ID from the main flow and execute the suspension command.
Build the helper flow by defining the input and adding the suspension action.
- Add an On-Demand Helper Flow card and define the User ID input.
- Pass the User ID to an Okta Suspend User card to suspend the user.
