Title: Conditional restriction
Last modified: December 19, 2024

---

# Conditional restriction

 *  Resolved [bttmrc](https://wordpress.org/support/users/bttmrc/)
 * (@bttmrc)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/conditional-restriction-2/)
 * We want all website admins to have 2FA enabled. However, we are using an SSO 
   plugin that allows Azure group members to log in to the website.
 * Some users fall into both categories: they are admins and also use SSO. For these
   users, we don’t want or need to enforce 2FA.
 * Is there a way to create a condition to handle this? Users logging in via SSO
   are assigned a specific user role.
 * I initially thought that enabling “ENFORCE 2FA” for Admins and excluding the 
   SSO user role would work, but it doesn’t seem to function as expected.
 * My concern is scalability—if we want to enforce 2FA for additional user roles
   beyond admins, adding exceptions for each user individually isn’t practical. 
   Do you have any suggestions for managing this setup effectively?

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/conditional-restriction-2/#post-18211325)
 * Thank you for trying our plugin [@bttmrc](https://wordpress.org/support/users/bttmrc/)
 * I am afraid that at the moment it is not possible to create such a condition.
   However, we are looking into supporting SSO in future updates, so this should
   not be an issue then because the plugin would recognize that a user is already
   logged in.
 * I am sorry I do not have a more positive answer for you today. Should you have
   any further questions, please do not hesitate to ask.
 * Have a great weekend.

Viewing 1 replies (of 1 total)

The topic ‘Conditional restriction’ is closed to new replies.

 * ![](https://ps.w.org/wp-2fa/assets/icon-256x256.png?rev=2961533)
 * [WP 2FA - Two-factor authentication for WordPress](https://wordpress.org/plugins/wp-2fa/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-2fa/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-2fa/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-2fa/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-2fa/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-2fa/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [robertabela](https://wordpress.org/support/users/robert681/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/conditional-restriction-2/#post-18211325)
 * Status: resolved