Even if you enforce Multi-Factor Authentication (MFA) across your entire organization, attackers can still bypass it if your tenant allows legacy authentication. Older protocols like POP3, IMAP, SMTP AUTH, and older Office clients do not support modern interactive MFA prompts meaning a compromised username and password alone is enough to access company data.
In fact, Microsoft security telemetry consistently shows that the vast majority of password spray attacks target legacy authentication endpoints. This guide walks you through auditing legacy sign-ins, creating a Conditional Access policy to block them safely, and verifying that your policy works without locking out critical services.
What Is Legacy Authentication and Why Block It?
Modern authentication relies on protocols such as OAuth 2.0, OpenID Connect, and SAML, which support MFA, Conditional Access device checks, and passwordless sign-ins. Legacy authentication relies on basic authentication (sending a username and password directly with each request) and cannot handle MFA challenges.
Common legacy authentication clients include:
- Exchange ActiveSync (EAS): Older built-in mail apps on mobile devices using basic authentication.
- Other Legacy Clients: Protocols such as POP3, IMAP4, SMTP AUTH, MAPI over HTTP (legacy mode), and Office 2010 or earlier clients.
Prerequisites
- Licensing: At least a Microsoft Entra ID P1 or P2 license (included in Microsoft 365 Business Premium, E3, and E5).
- Admin Permissions: Membership in the Conditional Access Administrator, Security Administrator, or Global Administrator role.
- Emergency Access Account: At least one cloud-only break-glass administrator account excluded from Conditional Access policies to prevent accidental tenant lockout.
Step 1: Audit Legacy Authentication Usage in Sign-In Logs
Before blocking legacy protocols, check whether any legitimate users, multifunction printers, or line-of-business apps are still relying on them.
- Sign in to the Microsoft Entra admin center (
entra.microsoft.com). - In the left navigation menu, go to Identity > Monitoring & health > Sign-in logs.
- Set the Date filter to Last 7 days (or Last 30 days for a broader view).
- Click Add filters, select Client app, and click Apply.
- Click the newly added Client app filter pill, select all options under the Legacy Authentication Clients section (such as Exchange ActiveSync, IMAP4, POP3, SMTP, and Other clients), and click Apply.
Tip: If you see legitimate legacy sign-ins from scanners or older scripts, note those accounts now so you can migrate them to modern OAuth 2.0 authentication or temporarily exclude them while you transition.
Step 2: Create the Block Legacy Authentication Conditional Access Policy
Once you have reviewed your sign-in logs, build the Conditional Access policy to block legacy clients.
1. Name the Policy and Assign Users
- In the Microsoft Entra admin center, navigate to Protection > Conditional Access > Policies.
- Click + New policy.
- Enter a clear, descriptive name such as
BLOCK - Legacy Authentication - All Users. - Under Assignments, click Users, select Include > All users.
- Switch to the Exclude tab, select Users and groups, and add your emergency break-glass administrator accounts (plus any temporary service accounts identified in Step 1).
Warning: Always exclude your break-glass emergency access accounts from tenant-wide Conditional Access policies. If a misconfiguration ever blocks normal sign-ins, your break-glass account ensures you can still sign in and recover access.
2. Select Target Resources
- Under Assignments, click Target resources.
- Keep the dropdown set to Cloud apps (or All resources).
- Under Include, select All resources (formerly ‘All cloud apps’) so legacy authentication is blocked across every service connected to Entra ID.
3. Configure Client Apps Conditions
- Under Conditions, click Client apps.
- Toggle Configure to Yes.
- Uncheck Browser and Mobile apps and desktop clients under Modern authentication clients.
- Check both boxes under Legacy authentication clients:
- Exchange ActiveSync clients
- Other clients
- Click Done.
4. Set Access Controls and Enable the Policy
- Under Access controls, click Grant.
- Select Block access and click Select.
- At the bottom under Enable policy, select Report-only first (or On if your Step 1 audit confirmed zero active legacy clients).
- Click Create.
Note: Running a new Conditional Access policy in Report-only mode for 3 to 7 days lets you review the Conditional Access insights and reporting workbook to see exactly which sign-ins would have been blocked before enforcing the rule.
Step 3: Verify the Policy with the What If Tool
You can test your policy immediately without waiting for a real legacy sign-in attempt by using the built-in Conditional Access What If tool.
- Go to Protection > Conditional Access > Policies and click What If in the top toolbar.
- Under User, select a standard user account in your tenant.
- Under Target resources, select Office 365 (or All cloud apps).
- Expand Client apps and select Exchange ActiveSync clients or Other clients.
- Click the What If button at the bottom of the page.
Look at the Policies that will apply tab in the results pane. Your BLOCK - Legacy Authentication - All Users policy should appear with a Grant Controls result of Block access (or Report-only: Block access if still in report-only mode). Repeat the test with Browser selected as the client app to confirm that normal modern sign-ins are not blocked by this policy.
Best Practices for Legacy Authentication Security
- Switch from Report-Only to On Promptly: Once you confirm no business-critical apps are affected, edit the policy and switch Enable policy from Report-only to On.
- Disable Basic Auth in Exchange Online: For defense-in-depth, also disable basic authentication protocols (POP, IMAP, SMTP, ActiveSync) using an Exchange Online Authentication Policy so requests are rejected before even reaching Entra ID.
- Modernize Printer and App Mail Relay: If you have older scanners or scripts using SMTP AUTH, migrate them to OAuth 2.0 authentication, Azure Communication Services, or an internal SMTP relay connector instead of keeping permanent user exclusions.