The event.user.enrolledFactors is not Set or is Undefined when Accessed in Actions

Overview

When accessed in Auth0 Actions extensibility code, the event.user.enrolledFactors object should show the user’s currently enrolled in Multi-Factor Authentication (MFA) factors, but it is undefined when attempting to access it in Actions.

Applies To

  • Actions code

Cause

The Customize MFA Factors Using Actions option is not enabled within the MFA settings, found in the Auth0 Dashboard under Security > Multi Factor Auth. The option can be seen in the screenshot below (showing it currently as enabled):

Solution

The Customize MFA Factors Using Actions option needs to be enabled. It can be found in the Auth0 Dashboard under Security > Multi Factor Auth.