4.7 Legacy Authentication Detection
Legacy Authentication Detection
Legacy authentication protocols — IMAP, POP3, SMTP, Exchange ActiveSync, Autodiscover — authenticate with username and password only. They do not support MFA, conditional access device checks, or token protection. For an attacker who has obtained credentials through phishing, legacy authentication is a direct path to the mailbox with no security controls in the way.
Blocking legacy authentication via conditional access eliminates an entire class of credential-based attacks. If your organisation has not deployed this policy, prioritise it above almost everything else. The queries in this subsection help you assess your current legacy auth usage and plan the transition.
Discover legacy authentication in your environment
Before blocking, you need to know what is using it:
| |
This shows every legacy protocol in use, how many sign-ins each generates, and which users are using them. The UserList identifies the specific accounts that need to be migrated to modern authentication before you can block legacy auth.
Common legitimate legacy auth users
| User type | Protocol | Migration path |
|---|---|---|
| Multifunction printers | SMTP | Configure to use OAuth or use a dedicated send connector |
| Older mobile devices | Exchange ActiveSync | Upgrade device or use Outlook Mobile |
| Line-of-business apps | IMAP/POP3 | Reconfigure to use OAuth, or create a specific CA exclusion |
| Service accounts | SMTP/IMAP | Migrate to app registration with Graph API |
The safest approach: create a conditional access policy blocking legacy authentication for all users, then add specific exclusions for the accounts identified above. This ensures new users and new services default to modern authentication. The exclusions should be reviewed quarterly and removed as legacy services are migrated.
Detect attackers using legacy auth after credential theft
| |
This query finds successful legacy auth sign-ins from IPs that have never been seen in modern authentication for the same user. If a user normally signs in via a browser from London, but IMAP4 access appears from Lagos, the credentials are compromised and the attacker is using IMAP to bypass MFA.
Check your understanding
1. Why can an attacker with stolen credentials access email via IMAP even when MFA is required?
2. Your legacy auth discovery query shows 3 users with IMAP access. What should you do before blocking legacy auth?