# Configure Multi-Factor Authentication

Learn how to turn on MFA methods for a Tenant and set when FusionAuth asks users for a second factor.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

Each Tenant controls which MFA methods users can add and when FusionAuth asks for a second factor. An Application can override when FusionAuth asks.

Before you start, set up delivery for each message-based method that you plan to use:

*   For email, configure an SMTP server and create an email template that contains the code. For more information, see [Configure Email](https://fusionauth.io/docs/email/configure-email.md) and [Email Templates](https://fusionauth.io/docs/email/email-templates.md).
*   For SMS or voice, add a messenger and create a message template that contains the code. For more information, see [Messengers](https://fusionauth.io/docs/messengers.md) and [Message Templates](https://fusionauth.io/docs/messengers/message-templates.md).

Authenticator apps need no delivery setup. The authenticator method is on by default.

## Turn On MFA Methods

1.  Navigate to Tenants and click edit on the Tenant.
    
2.  Click the Multi-Factor tab.
    
3.  Turn on each method that users can add:
    
    *   For authenticator apps, turn on **Enable authenticator (TOTP) MFA**.
    *   For email, turn on **Enable email MFA** and select the **Template**.
    *   For SMS, turn on **Enable SMS MFA** and select the **SMS messenger** and the **SMS template**.
    *   For voice calls, turn on **Enable voice MFA** and select the **Voice messenger** and the **Voice template**.
    
    ![The Multi-Factor tab of a Tenant, with the authenticator, email, SMS, and voice methods turned on.](https://fusionauth.io/img/docs/screenshots/authenticate-tenant-mfa-methods.png)
    
4.  Click save.
    

Email, SMS, and voice require the Starter plan or higher. When the Tenant turns on both SMS and voice, a user with a phone method chooses SMS or voice at each login.

When you use only step-up authentication, turn on at least one method anyway. Without a method on the Tenant, the MFA Status API never requires a step-up.

To configure the Tenant with the API, set the **`tenant.multiFactorConfiguration`** fields on the [Tenant API](https://fusionauth.io/docs/apis/tenants.md). For a full list of fields, see [Multi-Factor](https://fusionauth.io/docs/concepts/types/tenants.md#multi-factor) in the Tenant reference.

## Set the Login Policy

The **On login policy** on the Tenant's Multi-Factor tab controls when FusionAuth asks for a second factor at login. The policy has the following values:

*   `Enabled`: FusionAuth asks for MFA when the user has an MFA method. `Enabled` is the default.
*   `Disabled`: FusionAuth never asks for MFA at login, even when the user has an MFA method.
*   `Required`: FusionAuth always asks for MFA. A user without an MFA method must add one before the login completes. Available in FusionAuth `1.42.0` and later.
*   `Challenge On Medium Risk` and `Challenge On High Risk`: FusionAuth asks for MFA when [Intelligent MFA](https://fusionauth.io/docs/authentication/multi-factor-authentication/contextual.md#intelligent-mfa) rates the login as risky. Available in FusionAuth `1.68.0` and later, on the Starter plan or higher.

With the API, set **`tenant.multiFactorConfiguration.loginPolicy`** to `Enabled`, `Disabled`, `Required`, `ChallengeOnMediumRisk`, or `ChallengeOnHighRisk`.

Except under a risk-based policy, FusionAuth also skips the challenge for a device that the user trusted at an earlier login. While the policy isn't `Disabled`, the Tenant must keep at least one MFA method on. For the full decision logic, see [Contextual Multi-Factor Authentication](https://fusionauth.io/docs/authentication/multi-factor-authentication/contextual.md).

## Set an Application Policy

Application MFA policies require the Enterprise plan, with one exception. On any plan, you can require MFA for the Admin UI. Set the **On login policy** to `Required` at Applications -> FusionAuth -> Multi-Factor . Available since `1.49.0`

An Application policy overrides the Tenant policy for logins to the Application. For example, an Application for administrators can require MFA, while an Application for customers turns MFA off.

1.  Navigate to Applications and click edit on the Application.
    
2.  Click the Multi-Factor tab.
    
3.  Select the **On login policy**.
    
4.  When the policy is `Enabled` or `Required`, select the **Trust policy**. The trust policy decides whether an MFA challenge in another Application counts for this Application.
    
5.  Optionally, select templates to send codes for this Application instead of the Tenant templates.
    
    ![The Multi-Factor tab of an Application, with the login policy, trust policy, and template fields.](https://fusionauth.io/img/docs/screenshots/application-mfa.png)
    
6.  Click save.
    

For a full list of fields, see [Multi-Factor](https://fusionauth.io/docs/concepts/types/applications.md#multi-factor) in the Application reference. For examples of each trust policy, see [Application MFA Configuration](https://fusionauth.io/docs/authentication/multi-factor-authentication/contextual.md#application-mfa-configuration).

## Change Code Lifetimes

The Tenant sets how long each MFA code and identifier stays valid. Navigate to Tenants , click edit on the Tenant, and click the Advanced tab. The following durations apply to MFA:

*   **Two-Factor login**: how long a user has to finish the MFA challenge at login.
*   **Two-Factor one-time code**: how long a code to add or remove an MFA method stays valid.
*   **Two-Factor trust**: how long a trusted device skips the MFA challenge.
*   **Trust token**: how long a [trust token](https://fusionauth.io/docs/authentication/multi-factor-authentication.md#trust-tokens-and-trust-challenges) stays valid.

The **External identifier generation** section on the same tab sets the length and character type of each code. For more information, see [Advanced](https://fusionauth.io/docs/concepts/types/tenants.md#advanced) in the Tenant reference.

Related

[APIs Multi-Factor API Learn about the APIs for enabling and disabling multi-factor authentication for users. multi-factor authenticationmfatotp](https://fusionauth.io/docs/apis/two-factor.md)

[Authentication Enable Multi-Factor Authentication for a User Learn how to add MFA methods to a user with the account pages, the Admin UI, the Two-Factor APIs, or the User API. mfamulti-factor authenticationtwo-factor](https://fusionauth.io/docs/authentication/multi-factor-authentication/enable.md)

[Authentication Multi-Factor Authentication (MFA) Learn about multi-factor authentication (MFA) in FusionAuth, including the supported methods, recovery codes, and trust tokens. mfatwo-factormulti-factor authentication](https://fusionauth.io/docs/authentication/multi-factor-authentication.md)

[APIs Enable Multi-Factor API API documentation for the FusionAuth Enable Multi-Factor API. multi-factor authenticationmfatotp](https://fusionauth.io/docs/apis/two-factor/enable-multi-factor.md)
---

## Other pages in Multi Factor Authentication

> For the full index of this section, see [Authentication](https://fusionauth.io/docs/llms-authentication.txt).

- [Contextual Multi-Factor Authentication](https://fusionauth.io/docs/authentication/multi-factor-authentication/contextual.md): Learn how FusionAuth decides when to ask for MFA at login, including Tenant and Application policies, device trust, Intelligent MFA, and custom MFA logic.
- [Disable Multi-Factor Authentication for a User](https://fusionauth.io/docs/authentication/multi-factor-authentication/disable.md): Learn how to remove MFA methods from a user with the account pages, the Admin UI, the Two-Factor APIs, or the User API.
- [Enable Multi-Factor Authentication for a User](https://fusionauth.io/docs/authentication/multi-factor-authentication/enable.md): Learn how to add MFA methods to a user with the account pages, the Admin UI, the Two-Factor APIs, or the User API.
- [Multi-Factor Authentication (MFA)](https://fusionauth.io/docs/authentication/multi-factor-authentication.md): Learn about multi-factor authentication (MFA) in FusionAuth, including the supported methods, recovery codes, and trust tokens.
- [Multi-Factor Authentication at Login](https://fusionauth.io/docs/authentication/multi-factor-authentication/login.md): Learn how users complete an MFA challenge on the hosted login pages or on your own pages with the Login API, including recovery codes.
- [Add Step-Up Authentication With the Two-Factor APIs](https://fusionauth.io/docs/authentication/multi-factor-authentication/step-up-api.md): Learn how to ask a logged in user for another factor before a sensitive action, using the FusionAuth Two-Factor APIs.
- [Step-Up Authentication](https://fusionauth.io/docs/authentication/multi-factor-authentication/step-up.md): Learn about step-up authentication in FusionAuth, including how to choose an approach and how long a step-up stays valid.
