OVERVIEW
This guide will show how to clear user sessions in Okta.
SOLUTION
For this guide, the users are loaded from a Google Sheets spreadsheet:
Users in Google Sheets.
This is the main List users flow:
The flow has the following steps:
- The Google Sheets—Read All Rows card loads users from a spreadsheet. We will clear their Okta session for these users.
- The List – For Each Ignore Errors calls a helper flow to process the user list. It is similar to the List – For Each card but will continue working if errors occur in the helper flow.
- Note that the Columns field is passed to the helper flow (not Rows).
This is the Clear user session helper flow:
The flow has the following steps:
- The Helper Flow card has User input.
- The Object – Get card extracts the email from the user information.
- 2-Email is the third column in the spreadsheet.
- The Okta – Read User card retrieves the user’s ID.
- The Okta – Clear User Session card clears the session for the specified user ID.
- If a user’s session can’t be cleared, an error will occur, but the flow will continue to process other users since it uses List – For Each Ignore Errors card.
RELATED REFERENCES
