Problem statement
This article describes how to find a user’s MFA enrollments in Actions without making a management API call.
Solution
- Navigate to Dashboard > Security > Multi-factor Auth and enable the Customize MFA Factors using Actions setting in Additional Settings
- 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);
};