Okta Workflows how-to guides are questions and answers from weekly community office hours, MacAdmins Workflows Slack channel, and other places. Read all other how-to guides.
On to the question.
How to save user MFA information to a table?
You get a list of active users and want to save their MFA information to a table. Once the MFA information is in a table, you can review it and reset any MFA factors, if needed.
The solution has three flows:
- List users
- Get MFA information for a user (helper flow)
- Save MFA information to a table (helper flow)
The first flow uses the Okta – List Users with Search card to list active users with the streaming option:
The flow calls the User MFA Settings_Helper flow to get MFA information for each user in a list.
Get MFA information for a user
The helper flow below calls
/api/v1/users/ID/factors API endpoint using the Custom API Action card to get MFA information for each user in a list.
- With the Helper Flow card, the current record (user) is passed to the helper flow. You need the user ID and user Login fields
- The Compose card creates an API endpoint string URL with the current user ID
- The Custom API Action card calls the Factors API endpoint. The API returns an MFA factor list (a user can have multiple MFA factors)
- Using the List – For Each card, the list is passed to a helper flow that saves the MFA information into a table
Learn how to How to Call an API When It’s Not Available From an Existing Card (Connection)
This is how MFA settings for a user might look:
Save MFA information to a table
This helper flow saves MFA user information into a table.
- With the Helper Flow card, the User ID, User Login, and a list of MFA Type object is passed to this flow
- The Object – Get card retrieves the factorType property from the object
- The Tables – Create Row card saves the information into a table
A table with saved MFA information:
In this guide you learned how to retrieve user MFA information and save it into a table.
More resources to help you learn:
🗂 Join the weekly community office hours to get help
📺 Short how-to Workflows videos to help you become a better automation builder.
🍿 A collection of helpful Workflows tips.
Leave a Reply