# Disable MFA for some logins for a user

**URL:** <https://community.auth0.com/t/disable-mfa-for-some-logins-for-a-user/88513>\
**Category:** Get Help\
**Tags:** adaptive-mfa, mfa-sms, mfa\
**Created:** [August 10, 2022, 6:33pm UTC](https://community.auth0.com/t/disable-mfa-for-some-logins-for-a-user/88513 "2022-08-10T18:33:26Z")\
**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:** [August 10, 2022, 6:33pm UTC](https://community.auth0.com/t/disable-mfa-for-some-logins-for-a-user/88513/1 "2022-08-10T18:33:26Z")

</div>

On first login, we want the users to follow custom MFA(through redirection in login action). After that we want to enforce auth0 MFA. So when users login first time, we do not want `Auth0` mfa to kick in. We have setup MFA `Always` from settings.

Temporary solution: We have set MFA as `Never` and on first login we redirect user from action for custom mfa and afterwards we enforce MFA by setting `api.multifactor.enable('Any')`.

Is there any solutions like setting mfa to `none` first time and next time onwards, it keeps on enforcing because of the `Always` setting?

---

<div class="post-metadata">

**Author:** ![josiah\_devizia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/josiah_devizia/32/33352_2.png) [@josiah\_devizia](https://community.auth0.com/u/josiah_devizia)\
**Post date:** [August 10, 2022, 7:06pm UTC](https://community.auth0.com/t/disable-mfa-for-some-logins-for-a-user/88513/2 "2022-08-10T19:06:06Z")

</div>

You can set the provider to `none` to bypass the mfa policy I believe.

> **[Customize Adaptive MFA with Rules](https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa/adaptive-mfa-rules#overwrite-adaptive-mfa-with-rules)**
>
> Learn how to customize Adaptive Multi-Factor Authentication (MFA) with Auth0 Rules.

Note, this doc is about rules, but Actions are the recommended extensibility path. I assume it works the same, but you may want to verify first.

---

<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 11, 2022, 2:17pm UTC](https://community.auth0.com/t/disable-mfa-for-some-logins-for-a-user/88513/3 "2022-08-11T14:17:08Z")

</div>

We already tried, it throws an error. But there should be something corresponding to this in actions as well. Action document does not mention `none` as provider.

Fails for action:

 ![Screenshot 2022-08-11 at 7.38.52 PM](https://global.discourse-cdn.com/auth0/original/3X/5/a/5aa6155c1dc1cd7ce1545f1fdae42fd16e30be0f.png)

---

<div class="post-metadata">

**Author:** ![ale.vesga1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale.vesga1/32/60921_2.png) [@ale.vesga1](https://community.auth0.com/u/ale.vesga1)\
**Post date:** [November 18, 2024, 10:38pm UTC](https://community.auth0.com/t/disable-mfa-for-some-logins-for-a-user/88513/5 "2024-11-18T22:38:56Z")

</div>

Hi @rajivk,

I recommend taking a look at the [post-login event object](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object).

Properties that could be helpful are the following:

`event.stats` Login statistics for the current user.

- `logins_count` _Number_. The number of times this user has logged in.

`event.authentication.riskAssessment.impossibleTravel.code`

- Where a possible string value that could be used is `initial_login`

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 2, 2024, 10:39pm UTC](https://community.auth0.com/t/disable-mfa-for-some-logins-for-a-user/88513/6 "2024-12-02T22:39:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
