Add MFA Factors for Users Programmatically During Account Creation

Overview

This article addresses whether it is possible to add Multi-Factor Authentication (MFA) factors for a new user programmatically during the account creation process. This method would prevent the user from having to enroll the factor themselves during their initial sign-in.

Applies To
  • Auth0
  • Multi-Factor Authentication (MFA)
  • Management API
  • User Import / Creation
Solution

It is possible to add MFA factors for a user programmatically instead of requiring the user to enroll themselves. There are two primary methods available.

Method 1: Bulk User Import Job

Method 2: Factor Management API

  • As an alternative for individual users, use the Factor Management API endpoints to create MFA factors for a specific user.

  • NOTE: This API endpoint creates the factor in a confirmed state. It is recommended to verify the factor (e.g., the phone number) through a separate process before adding it to the user's account via the API.

Recommended content

No recommended content found...