Okta Workflows How-To: Save User MFA Information to a Workflows Table

Okta Workflows is a no-code platform for automating identity processes. 

This blog post is based on a question asked during office hours or the #okta-workflows channel in MacAdmins Slack: How to save user MFA information to a table? 

Note: It is not recommended to use a Workflows table for long-term storage. Please read the How to Save User MFA Information to a Google Sheets Spreadsheet in Workflows Knowledge Base article. 

Getting started

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:

  1. List users
  2. Get MFA information for a user (helper flow)
  3. Save MFA information to a table (helper flow)

List users

The first flow uses the Okta – List Users with Search card to list active users with the streaming option:

workflows_howto_mfa_list_users.png (1010×982)List users flow

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.

workflows_howto_mfa_mfa_api.png (2566×1174)Helper flow to get MFA information for a user

  • 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:

workflows_howto_mfa_mfa_factors_list.png (674×898)MFA factors list

Save MFA information to a table

This helper flow saves MFA user information into a table.

workflows_howto_mfa_mfa_save_table.png (1650×1058)Save MFA information to 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:

workflows_howto_mfa_table.png (1746×762)User MFA information table

In this guide, you learned how to retrieve user MFA information and save it into a table.

Get your Workflows questions answered

Do you have a question about Okta Workflows? Not sure how to build a flow? Join the weekly community office hours to get help. 

 

Tags

Workflows