# Enforce sms as MFA on certain condition

**URL:** <https://community.auth0.com/t/enforce-sms-as-mfa-on-certain-condition/87894>\
**Category:** Get Help\
**Tags:** mfa-sms\
**Created:** [July 29, 2022, 2:42pm UTC](https://community.auth0.com/t/enforce-sms-as-mfa-on-certain-condition/87894 "2022-07-29T14:42:51Z")\
**Posts on this page:** 5\
**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:** [July 29, 2022, 2:42pm UTC](https://community.auth0.com/t/enforce-sms-as-mfa-on-certain-condition/87894/1 "2022-07-29T14:42:51Z")

</div>

We have turned on SMS and OTP based MFA in out application. We want to enforce SMS MFA during login on some condition. I know we can enforce MFA through actions but it asks user to select any MFA method enabled for the tenant. Is there a way, we could restrict SMS based MFA for certain users for login?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [July 29, 2022, 3:47pm UTC](https://community.auth0.com/t/enforce-sms-as-mfa-on-certain-condition/87894/3 "2022-07-29T15:47:01Z")

</div>

Hi @rajivk ,

Thank you for posting this topic on the Auth0 Community!

[This](https://community.auth0.com/t/how-to-enable-mfa-for-a-subset-of-users/87505) FAQ described how to enforce MFA for a subset of users. To enable SMS, please replace `any` with `SMS` in the scripts.

Hope this helps!

---

<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:** [July 29, 2022, 4:06pm UTC](https://community.auth0.com/t/enforce-sms-as-mfa-on-certain-condition/87894/4 "2022-07-29T16:06:09Z")

</div>

Hi @lihua.zhang

We already tried it. Here is the error

 ![Screenshot 2022-07-29 at 9.32.45 PM](https://global.discourse-cdn.com/auth0/original/3X/b/d/bd7a670b494b47c5dd38f0e35c4bea01c1fe4aba.png)

I guess, valid values for provider are `any`, `duo`, `guardian` or `google-authenticator`. [https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa#use-rules](https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa#use-rules)

 ![Screenshot 2022-07-29 at 9.33.16 PM](https://global.discourse-cdn.com/auth0/original/3X/d/f/df49ef688ab6569326c72337c5072f6bf9b701b8.png)

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [August 3, 2022, 7:33pm UTC](https://community.auth0.com/t/enforce-sms-as-mfa-on-certain-condition/87894/5 "2022-08-03T19:33:07Z")

</div>

You are right @rajivk ! There is no option to set up the provider as sms only.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [August 24, 2022, 6:57pm UTC](https://community.auth0.com/t/enforce-sms-as-mfa-on-certain-condition/87894/6 "2022-08-24T18:57:51Z")

</div>


