Multi-factor authentication (MFA) is a critical security component for protecting your organization's resources. By requiring users to provide multiple forms of verification when signing in, you significantly reduce the risk of unauthorized access. However, there are scenarios where you need emergency access to your environment, even if normal authentication methods are unavailable. This tutorial will guide you through creating a conditional access policy that requires MFA for all users while also setting up emergency accounts that are exempted from these requirements.
Before you begin, ensure you have:
- Administrative access to Microsoft Entra ID (formerly Azure AD)
- Global Administrator or Conditional Access Administrator role
- A mobile phone for testing MFA registration
- Basic understanding of Microsoft Entra ID and conditional access concepts
Conditional Access policies in Microsoft Entra ID act as if-then statements: if a user wants to access a resource, then they must complete an action. For example, if a user wants to access Microsoft 365, then they must complete multi-factor authentication.
Multi-factor authentication provides additional security by requiring two or more of the following verification methods:
- Something you know (password)
- Something you have (trusted device, security key)
- Something you are (biometrics)
Emergency access accounts (also known as "break glass" accounts) are necessary for scenarios where:
- Federation services are unavailable, preventing normal sign-in
- MFA services are unavailable
- The last Global Administrator has left the organization
- Natural disasters or other emergencies make normal authentication methods inaccessible
- Approval workflows for privileged roles are unavailable
These accounts should be carefully managed, monitored, and used only when absolutely necessary.
Let's start by creating a conditional access policy that requires MFA for all users:
- Sign in to the Microsoft Entra admin center as a Global Administrator or Conditional Access Administrator.
- In the navigation pane, expand Protection and select Conditional Access.
- On the Conditional Access page, select Policies, and then select + New policy.
- In the Name field, enter a descriptive name such as "Require MFA for All Users".
- Under Assignments, select Users and groups.
- On the Include tab, select All users.
- (Optional) If you want to exclude specific users or groups temporarily during testing, you can use the Exclude tab.
- Under Target resources, select Cloud apps.
- On the Include tab, select All cloud apps.
- (Optional) If you want to exclude specific apps, you can use the Exclude tab.
- Under Access controls, in the Grant section, select Grant access.
- Select the checkbox for Require multi-factor authentication.
- Ensure that Require all the selected controls is selected.
- Click Select.
- Under Enable policy, set the toggle to On.
- Click Create to create and enable the policy.
Now, let's create emergency access accounts that will be excluded from the MFA requirement:
- In the Microsoft Entra admin center, navigate to Identity > Users > All users.
- Click + New user > Create new user.
- Enter a username following your naming convention for emergency accounts (e.g.,
emergency-admin1@yourdomain.onmicrosoft.com). - Enter a strong, complex password.
- Under Properties, fill in required information.
- Under Assignments, assign the Global Administrator role.
- Click Create to create the account.
- Repeat the process to create a second emergency access account.
While emergency accounts are excluded from conditional access MFA policies, they should still use strong authentication methods:
-
For each emergency account, consider using one of these methods:
- FIDO2 security keys (recommended)
- Certificate-based authentication
- Hardware OATH tokens
-
To set up a FIDO2 security key:
- Sign in with the emergency account
- Navigate to Security Info
- Add a security key as an authentication method
- Register the physical security key following the prompts
- In the Microsoft Entra admin center, navigate to Groups > All groups.
- Click + New group.
- Set Group type to Security.
- Enter a name such as "Emergency Access Accounts".
- Set Membership type to Assigned.
- Add your emergency access accounts to the group.
- Click Create.
- Return to Protection > Conditional Access > Policies.
- Select the MFA policy you created earlier.
- Under Assignments, select Users and groups.
- On the Exclude tab, select Users and groups.
- Select the "Emergency Access Accounts" group you created.
- Click Select and then Save to update the policy.
- Sign in to a Microsoft 365 service (like Outlook Web App) with a regular user account.
- You should be prompted to set up MFA if not already configured.
- Complete the MFA setup process:
- Select a verification method (phone, authenticator app, etc.)
- Register the method following the prompts
- Verify that you can sign in successfully with MFA
- Sign in to the Microsoft Entra admin center with one of your emergency access accounts.
- Verify that you can access the portal without being prompted for MFA (beyond the authentication method you configured directly for the account).
- Sign out when testing is complete.
- In the Microsoft Entra admin center, navigate to Monitoring > Sign-ins.
- Create a filter for your emergency access accounts.
- Consider setting up alerts for when these accounts are used:
- Navigate to Monitoring > Audit logs
- Configure alerts for sign-in events from emergency accounts
- Schedule regular reviews of your emergency access accounts (at least quarterly).
- Verify that:
- The accounts are still accessible
- The authentication methods still work
- The accounts are still excluded from appropriate policies
- The passwords or authentication methods are still secure
- Create at least two emergency access accounts to ensure redundancy.
- Use cloud-only accounts with the
.onmicrosoft.comdomain to avoid dependencies on on-premises systems. - Use strong authentication methods like FIDO2 security keys.
- Store credentials securely in a physical safe or secure location.
- Make emergency access accounts permanent rather than eligible for just-in-time access.
- Exclude emergency accounts from automated processes that might disable or change them.
- Document the emergency access procedure and ensure multiple administrators know how to use these accounts.
- Monitor usage of emergency access accounts and investigate any unexpected sign-ins.
- Test emergency access accounts regularly to ensure they work when needed.
- Review and rotate credentials periodically according to your security policies.
For more granular control, you can create a dedicated conditional access policy for your emergency access accounts:
- Create a new conditional access policy named "Emergency Access Accounts Policy".
- Under Assignments > Users and groups, include only your emergency access accounts group.
- Under Target resources, select All cloud apps.
- Under Access controls > Grant, select Grant access without requiring MFA.
- Set the policy to On and create it.
- Ensure this policy has a higher priority than your general MFA policy by using the Reorder function.
- Check if there are other conditional access policies affecting these accounts.
- Verify that the accounts are correctly added to the exclusion group.
- Check if there are per-user MFA settings enabled for these accounts.
- Review the sign-in logs to identify which policy is triggering the MFA requirement.
- Verify that the conditional access policy is enabled.
- Check the policy assignments to ensure users are included.
- Review the sign-in logs to see if the policy is being evaluated.
- Test with a different user account or browser session.
Implementing conditional access policies for MFA while maintaining emergency access accounts is a critical balance between security and operational resilience. By following this tutorial, you've created a robust authentication system that protects your organization's resources while ensuring you can still access your environment in emergency situations.
Remember that emergency access accounts should be used only when absolutely necessary, and their usage should be monitored and audited. Regular testing and validation of both your MFA policies and emergency access procedures will help ensure they work as expected when needed.

