# Disable MFA based on IP allow list

**URL:** <https://community.auth0.com/t/disable-mfa-based-on-ip-allow-list/104957>\
**Category:** Get Help\
**Tags:** adaptive-mfa, mfa\
**Created:** [April 18, 2023, 9:05am UTC](https://community.auth0.com/t/disable-mfa-based-on-ip-allow-list/104957 "2023-04-18T09:05:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emiel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/emiel/32/33674_2.png) [@emiel](https://community.auth0.com/u/emiel)\
**Post date:** [April 18, 2023, 9:05am UTC](https://community.auth0.com/t/disable-mfa-based-on-ip-allow-list/104957/1 "2023-04-18T09:05:58Z")

</div>

Hi there,

Currently we are using a Rule that checks for user\_metadata to determine if MFA needs to be disabled for a specific user.

Does Auth0 support something like that based on IP allow listing. If this requires custom setup, could anyone point me in the proper direction on the proper way to accomplish this?

---

<div class="post-metadata">

**Author:** ![art.stupels](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/art.stupels/32/30429_2.png) [@art.stupels](https://community.auth0.com/u/art.stupels)\
**Post date:** [April 18, 2023, 10:33am UTC](https://community.auth0.com/t/disable-mfa-based-on-ip-allow-list/104957/2 "2023-04-18T10:33:29Z")

</div>

Hello Emiel,

You should be able to achieve this via Rules as well.

To do this, you will need to create an array of IPs, e.g.:

`const allowedIPs = [0.0.0.0, 127.0.0.1]`

And then, check if the user IP `context.request.ip` is included or not in the array. Here’s the sample code snippet; please adjust it as per your requirement:

```auto
if ( allowedIPs.includes(context.request.ip) ) {
  context.multifactor = {
   provider: 'any',
   allowRememberBrowser: false
  }
}

```

Please review [all context object properties available in Rules](https://auth0.com/docs/customize/rules/context-object).

I hope this helps!

---

<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:** [May 3, 2023, 4:46am UTC](https://community.auth0.com/t/disable-mfa-based-on-ip-allow-list/104957/4 "2023-05-03T04:46:16Z")

</div>

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