How to Find the Users MFA Enrollments in Actions

Overview

This article describes how to find a user's multifactor authentication (MFA) enrollments in Actions without making a Management API call.

Applies To
  • Multifactor Authentication (MFA)
  • Enrollments
Solution
1. Navigate to Dashboard > Security > Multi-factor Auth and enable the Customize MFA Factors using Actions setting in Additional Settings

Screenshot 2024-02-15 at 22.30.39.png
2. The user's MFA enrollments are now available with event.user.enrolledFactors in Actions.
exports.onExecutePostLogin = async (event, api) => {
  
  console.log("=================== ENROLLED FACTORS");
  console.log(event.user.enrolledFactors);

};

image.png

Recommended content

No recommended content found...