# How to enforce a single MFA for a user

**URL:** <https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121>\
**Category:** Get Help\
**Tags:** mfa\
**Created:** [August 3, 2022, 2:21pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121 "2022-08-03T14:21:47Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [August 3, 2022, 2:21pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/1 "2022-08-03T14:21:47Z")

</div>

Authentication APIs allows a user to enroll more than MFA. How could we ensure that a user can not setup more than one MFA?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 3, 2022, 10:31pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/3 "2022-08-03T22:31:10Z")

</div>

Hi @rajivk,

Thanks for reaching out to the Auth0 Community!

I understand that you would like to enforce MFA for a single user.

In this situation, I recommend using an Auth0 Post-Login Action to selectively enforce MFA for the user.

Please review our [How To Enable MFA For A Subset of Users](https://community.auth0.com/t/how-to-enable-mfa-for-a-subset-of-users/87505) FAQ which goes into further detail on how to accomplish this.

If you have any additional questions or need help with implementation, please feel free to reach out.

Thank you.

---

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [August 4, 2022, 4:30am UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/4 "2022-08-04T04:30:47Z")

</div>

This link explains how we can enforce a particular MFA. Our requirement is, we allow users to choose any mfa(sms, otp etc). but user should not be able to setup more than one MFA. There must be only one active MFA(whatever user choose) at time.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 5, 2022, 5:01pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/5 "2022-08-05T17:01:34Z")

</div>

Hi @rajivk,

Thank you for your response and clarification.

> [@rajivk](#):
>
> user should not be able to setup more than one MFA.

Unfortunately, it is not possible to prevent users from enrolling in alternative MFA factors if you have more than one factor enabled.

Meaning that it is not possible to enforce a specific factor without providing alternative methods to authenticate with MFA.

I hope this answers your questions.

Please let me know if you need help with anything else.

Thank you.

---

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [August 8, 2022, 12:59pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/6 "2022-08-08T12:59:34Z")

</div>

@rueben.tiow thank you.

So my understanding is, a user can have any number of active MFA enrolled at a time, given they must be enabled from the auth0 dashboard. We can not restrict users to have one active MFA(of their choice) enrolled at a time.

BTW i tried to enrol a user with OTP and then for SMS using authentication API. It says that user is already enrolled.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 8, 2022, 5:46pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/7 "2022-08-08T17:46:02Z")

</div>

Hi @rajivk,

Thank you for your response.

> [@rajivk](#):
>
> We can not restrict users to have one active MFA(of their choice) enrolled at a time.

Yes, your understanding is correct! 👍

> [@rajivk](#):
>
> BTW i tried to enrol a user with OTP and then for SMS using authentication API. It says that user is already enrolled.

To better understand the situation, could you please share the requests you made to enroll a user with OTP and SMS?

Thank you.

---

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [August 16, 2022, 10:35am UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/8 "2022-08-16T10:35:33Z")

</div>

Hi @rueben.tiow

I used

- `/mfa/challenge` for otp generation
- `/mfa/associate` for associating MFA
- `/oauth/token` for verification

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 29, 2022, 5:21pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/9 "2022-08-29T17:21:46Z")

</div>

Hi @rajivk,

Thank you for your reply.

As far as I can tell, it seems like you are adding MFA factors correctly for your users by calling those endpoints.

In this case, could you please confirm if the SMS and OTP MFA factors are enabled for the user on the [Auth0 Dashboard \> User Management \> Users](https://manage.auth0.com/#/users) page?

It may also be worth resetting the MFA and retrying the MFA enrollment again.

Lastly, if this issue continues, could you please send me a direct message of your tenant’s name for me to investigate further?

Please let me know how this goes for you.

Thank you.

---

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [August 30, 2022, 6:51am UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/10 "2022-08-30T06:51:59Z")

</div>

> In this case, could you please confirm if the SMS and OTP MFA factors are enabled for the user on the [Auth0 Dashboard \> User Management \> Users](https://manage.auth0.com/#/users) page?

Yes, SMS and OTP both are enabled on this page.

> It may also be worth resetting the MFA and retrying the MFA enrolment again.

I tried it using API mentioned in previous replies and i can not configure more than one MFA at a time for a user. Could you share any docs or article that says it is even possible in `Auth0`.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 30, 2022, 4:46pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/11 "2022-08-30T16:46:33Z")

</div>

Hi @rajivk,

Thank you for your clarification.

If **SMS** and **OTP** are both enabled for the user, then it is normal to see a message indicating that the user is already enrolled in those factors. Therefore, calling the `/mfa/associate` endpoint for that user is not needed since they have already enrolled in both SMS and OTP MFA factors.

At this point, you can proceed by calling the `/mfa/challenge` endpoint for OTP/SMS generation, and verify MFA for OTP/SMS by calling the `/oauth/token` endpoint.

> [@rajivk](#):
>
> I tried it using API mentioned in previous replies and i can not configure more than one MFA at a time for a user. Could you share any docs or article that says it is even possible in `Auth0`.

You should be able to configure more than one MFA factor for a user at a time. Our [Enable Multi-Factor Authentication](https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa) documentation explains that:

“In the **Factors** section, choose the factors that you want to enable with toggles. Any or all of these factors can be enabled simultaneously.”

Please see these resources on enrolling SMS and OTP MFA:

- [Enroll and Challenge SMS and Voice Authenticators](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-challenge-sms-voice-authenticators)
- [Enroll and Challenge OTP Authenticators](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-and-challenge-otp-authenticators)

Thank you.

---

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [August 31, 2022, 7:32am UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/12 "2022-08-31T07:32:48Z")

</div>

I think, i am not able to clarify scenario.

There are two separate thing

1. Could we enable multiple factors for the tenants?  
**My Observation** : yes, we can. your [this](https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa) docs explain it.  
**NOTE: This has been clear to me. No further answer is required for this question.**

2. Could a user configure multiple MFA like `sms` and `otp` for their account and choose anyone of them for the login?  
**For better explanation let’s take an example** :  
**Tenant Setting:** We have configured `MFA` and `SMS` from [this](https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa) article for the tenant, so a user should be able to choose anyone of them. We have also marked MFA always.  
**User** - A user login first time after signup. Auth0 enforce to configure any one MFA from `sms` or `otp`. let’s say user decides to configure `otp` based MFA. After some days this user wants to configure `sms`(wants to keep `otp` based mfa) for his/her account so he/she could chose anyone at the time of login.

is there any configuration that we needs to enable to support this scenario?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 9, 2022, 5:11pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/13 "2022-09-09T17:11:35Z")

</div>

Hi @rajivk,

Thank you for your response.

> [@rajivk](#):
>
> Could we enable multiple factors for the tenants?

Yes, this is possible. Here is an example of my MFA settings enabled with multiple factors:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/6/26efd6314e240793e07257cda1023243d0539794.png)

> [@rajivk](#):
>
> Could a user configure multiple MFA like `sms` and `otp` for their account and choose anyone of them for the login?

Yes, this is possible. Whenever a user logs in for the first time, they will be shown the most secure factor available but will be allowed to choose another factor to use if they have more than one factor enabled in the Dashboard. There should be a **Try another method** button on the MFA screen to allow the user to select another factor.

Please see [this response in another thread](https://community.auth0.com/t/switching-between-mfas/85294/3) by my colleague showing that it is possible for both OTP and SMS working.

I hope this helps!

Thank you.

---

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [September 12, 2022, 12:09pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/14 "2022-09-12T12:09:03Z")

</div>

Hi @rueben.tiow

Yeah, this order works as mentioned in [this](https://community.auth0.com/t/switching-between-mfas/85294/3) post. Adding SMS and then configure OTP MFA.

But it does not work in reverse order i.e adding OTP and them SMS based MFA. Could you please confirm on this order?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 15, 2022, 7:10pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/15 "2022-09-15T19:10:19Z")

</div>

Hi @rajivk,

Thank you for your reply.

> [@rajivk](#):
>
> But it does not work in reverse order i.e adding OTP and them SMS based MFA. Could you please confirm on this order?

Yes, I can confirm that this order will work. To do so, you could make a request to the Authentication API’s [Add an Authenticator endpoint](https://auth0.com/docs/api/authentication#add-an-authenticator) to add OTP first before adding SMS.

Please let me know if there’s anything else I can do to help.

Thanks!

---

<div class="post-metadata">

**Author:** ![rajivk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rajivk/32/33874_2.png) [@rajivk](https://community.auth0.com/u/rajivk)\
**Post date:** [September 20, 2022, 2:40pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/16 "2022-09-20T14:40:53Z")

</div>

Hi @rueben.tiow

I tried this order multiple times but it does not work. It says an MFA is already registered. But reverse order works fine. Could you please try at your end?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 21, 2022, 3:26pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/17 "2022-12-21T15:26:33Z")

</div>



---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [January 9, 2023, 11:02pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/18 "2023-01-09T23:02:56Z")

</div>

Hi @rajivk,

Thank you for your response and I’m sorry for the delayed reply.

> [@rajivk](#):
>
> Could you please try at your end?

I have just tested this myself on my tenant and it works successfully. I managed to get OTP enrolled before SMS.

Please let me know if you have any additional questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![jessie.jacobson](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jessie.jacobson](https://community.auth0.com/u/jessie.jacobson)\
**Post date:** [December 5, 2023, 4:39pm UTC](https://community.auth0.com/t/how-to-enforce-a-single-mfa-for-a-user/88121/19 "2023-12-05T16:39:19Z")

</div>

Hi @rajivk. We recently released a feature that may work well for your use case that you have described here: [Customize MFA Selection](https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa-selection-nul).

I’d recommend using a combination of the event.user.enrolledFactors to determine whether the user has any enrolled factors (see event object docs below & sample code in the feature docs) and the challengeWith or challengeWithAny (see api object docs below & sample code in the feature docs) commands. You can also use the additionalFactors to leverage the ‘Try Another Method’ and allow users to choose which MFA factor that they’d like to be challenged with on their initial MFA challenge.

- [Documentation for the post-login - API Object on the Actions Trigger](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/api-object)
- [Documentation for the post-login - Event Object on the Actions Trigger](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/event-object)

Take a look at the [overall feature documentation](https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa-selection-nul) to get more information about the feature.
