# Feature-request: Different MFA policies by organization

**URL:** <https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529>\
**Category:** Product Feedback\
**Created:** [October 18, 2021, 7:41pm UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529 "2021-10-18T19:41:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunny.pelletier](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sunny.pelletier/32/31728_2.png) [@sunny.pelletier](https://community.auth0.com/u/sunny.pelletier)\
**Post date:** [October 18, 2021, 7:41pm UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/1 "2021-10-18T19:41:15Z")

</div>

**Feature:**  
Support for different MFA policies by organization.

**Description:** We should be able to customize MFA usage by organization. Some organizations might want MFA disabled by default. Some other organizations might want to use different authentication factors.

The ideal solution I would see would be to allow enabling different MFA policies by CONNECTION. so that you could configure for instance

- OTP for the username-password connection of organization #1
- None for SSO connection of the same organization (#1)
- SMS for the username-password connection of organization #2 (in isolated organization members)

**Use-case:** Some customers already have MFA in their SSO. So it’s rather annoying for them to have to fill another MFA after already completing their first MFA with their SSO. Along with that, in my company, we have some organizations that are only there for demo/test purpose, so having MFA on those is extremely annoying.

Ref: [Different MFA policies by organization](https://community.auth0.com/t/different-mfa-policies-by-organization/71202)

---

<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:** [October 19, 2021, 2:14pm UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/2 "2021-10-19T14:14:48Z")

</div>

Thank you for creating this feedback card! Let’s see how many community members will be interested in such improvement!

---

<div class="post-metadata">

**Author:** ![adam.housman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adam.housman/32/19907_2.png) [@adam.housman](https://community.auth0.com/u/adam.housman)\
**Post date:** [December 3, 2021, 6:36pm UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/3 "2021-12-03T18:36:30Z")

</div>

@sunny.pelletier you can do this currently with extensibility.

To try this out:

1. Set MFA to “Always” in your dev Auth0 tenant. (Security → Multi-factor Auth → Define policies → Require Multi-factor Auth **Always** )
2. Update an organization to have a metadata field called `disableMFA` set to `true`.
3. Create a post-login Action as below. To make this one work you’ll need to add the lodash module [as a dependency](https://auth0.com/docs/actions/write-your-first-action#add-a-dependency).

When logging in via that organization, end-users won’t see the Auth0 MFA prompt, whereas end-users logging in with a different organization (or no organization) will get MFA.

```auto
/**
* Handler that will be called during the execution of a PostLogin flow.
*
* @param {Event} event - Details about the user and the context in which they are logging in.
* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
*/

const _ = require('lodash');

exports.onExecutePostLogin = async (event, api) => {
  // Disable MFA for end-users logging in via an organization that has the disableMFA metadata flag
  // Can also set at connection level (event.connection.metadata)
  if(_.get(event.organization, 'metadata.disableMFA', false)){
    api.multifactor.enable("none");
  }
};

```

An equally valid way to do this would be to conditionally _enable_ MFA for just the organizations that need it. See [the docs](https://auth0.com/docs/login/mfa/customize-mfa-user-pages#use-rules).

---

<div class="post-metadata">

**Author:** ![sunny.pelletier](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sunny.pelletier/32/31728_2.png) [@sunny.pelletier](https://community.auth0.com/u/sunny.pelletier)\
**Post date:** [December 3, 2021, 7:23pm UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/4 "2021-12-03T19:23:20Z")

</div>

Thank you for your answer. I will try it out as soon as possible. I asked the question on another topic, and I was answered that it was not possible. If it is possible, then ignore the feature request. Thanks a lot for the answer!

---

<div class="post-metadata">

**Author:** ![sunny.pelletier](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sunny.pelletier/32/31728_2.png) [@sunny.pelletier](https://community.auth0.com/u/sunny.pelletier)\
**Post date:** [December 8, 2021, 3:33pm UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/5 "2021-12-08T15:33:20Z")

</div>

Tested it and it worked 🙂 you can ignore this feature request!

---

<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 9, 2021, 10:14am UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/6 "2021-12-09T10:14:24Z")

</div>

Perfect! Closing it then!

---

<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 9, 2021, 10:14am UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/7 "2021-12-09T10:14:27Z")

</div>



---

<div class="post-metadata">

**Author:** ![adam.housman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adam.housman/32/19907_2.png) [@adam.housman](https://community.auth0.com/u/adam.housman)\
**Post date:** [November 8, 2023, 1:14pm UTC](https://community.auth0.com/t/feature-request-different-mfa-policies-by-organization/71529/8 "2023-11-08T13:14:17Z")

</div>

FYI we improved this capability to also allow per-Organization MFA factor selection using extensibility: you can customize the MFA factors that are required for end-users in a variety of different scenarios. See [this example](https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa-selection-nul#use-metadata-to-determine-challenge-method) which demonstrates how this can be done on a per-Organization basis using Organization metadata.
