How To Save User MFA Information to a Workflows Table

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:

  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:

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.

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:

MFA factors list

Save MFA information to a table

This helper flow saves MFA user information into a table.

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:

User MFA information table

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.

Published by

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.