This guide teaches how to suspend multiple users from a CSV file.
- Okta Workflows
The automation has two flows:
- Getting users to suspend.
- Pass each user to a helper flow to suspend the user.
- Getting users flow
The main flow to get users to suspend:
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:
-
- 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:
-
- 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 and passes the User ID to the helper flow.
-
- 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.
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.
Related References
- How to Setup a Workflows Helper Flow (with For-Each and Streaming Cards)
- How to Iterate Over Rows in a Table in Okta Workflows
