Update an Auth0 Multi-Factor Authentication Phone Number Without Affecting Other Factors

Overview

When attempting to update a user's Multi-Factor Authentication (MFA) using a PUT request to the /authentication-methods endpoint, Auth0 removes all previously configured factors or generates a BAD REQUEST error if multiple factors are passed. To update only one factor without affecting other existing factors, delete the existing factor and then create a new one using the Auth0 Management Application Programming Interface (API).

 

BAD REQUEST

 

Applies To

  • Auth0
  • Multi-Factor Authentication (MFA)
  • Management API

Solution

How is a specific MFA phone number updated?

Delete the existing SMS factor and create a new one with the updated phone number using the Auth0 Management API by following these steps:

  1. Delete the old SMS factor by sending a DELETE request to the Authentication Methods Endpoint.
  2. Create a new SMS factor for the user by sending a POST request to the Authentication Methods Endpoint.
  3. Include the new phone number in the body of the POST request using the following format:
    {
        "type": "phone",
        "phone_number": "<phone_number>",
        "preferred_authentication_method": "sms"
    }

Recommended content

No recommended content found...