How the attack works
Legacy authentication covers clients that authenticate with basic credentials instead of modern OAuth: older mail protocols (IMAP4, POP3, authenticated SMTP), Exchange ActiveSync with basic authentication, Exchange Web Services, MAPI over HTTP and Autodiscover on older clients, and other clients that cannot show an MFA prompt. Because the client never shows the Microsoft sign-in page, MFA cannot be requested; a correct password is enough.
Attackers use these endpoints for password spraying and to sign in with stolen passwords without triggering MFA. Microsoft has retired basic authentication for most Exchange Online protocols, so a successful legacy sign-in today usually means an exception that someone left open or an application that still uses it. The sign-in log records the protocol in ClientAppUsed; any value other than Browser or Mobile Apps and Desktop clients is legacy authentication. Such sign-ins can appear in both the interactive and the non-interactive sign-in logs.
What an attacker needs
- A valid password for the account.
- Legacy authentication not blocked by Conditional Access or security defaults, and the protocol still enabled for the mailbox or service.
Impact
Mailbox access and mail sending as the user without MFA, which is enough for business email compromise and internal phishing, and a foothold for further attacks.
Detection rules
Successful Sign-In With a Legacy Authentication Client
Detects a successful interactive sign-in whose ClientAppUsed is one of the legacy authentication clients listed by Microsoft (IMAP4, POP3, authenticated SMTP, Exchange ActiveSync, Exchange Web Services, MAPI over HTTP, Autodiscover, Other clients and others). MFA cannot be enforced on these sign-ins. Legacy sign-ins can also be recorded in the non-interactive sign-in log; run the same filter there (AADNonInteractiveUserSignInLogs in Sentinel) for full coverage.
title: Successful Sign-In With a Legacy Authentication Client
id: ff89ed16-a4be-4b8d-913c-5350a46ba488
status: experimental
description: >-
Detects a successful interactive sign-in whose ClientAppUsed is one of the
legacy authentication clients listed by Microsoft (IMAP4, POP3,
authenticated SMTP, Exchange ActiveSync, Exchange Web Services, MAPI over
HTTP, Autodiscover, Other clients and others). MFA cannot be enforced on
these sign-ins. Legacy sign-ins can also be recorded in the non-interactive
sign-in log; run the same filter there (AADNonInteractiveUserSignInLogs in
Sentinel) for full coverage.
references:
- https://learn.microsoft.com/en-us/entra/identity/monitoring-health/howto-customize-filter-logs
- https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-block-legacy-authentication
author: Forestall
date: 2026-11-10
tags:
- attack.initial-access
- attack.persistence
- attack.t1078.004
logsource:
product: azure
service: signinlogs
detection:
selection:
ClientAppUsed:
- Authenticated SMTP
- Autodiscover
- Exchange ActiveSync
- Exchange Online PowerShell
- Exchange Web Services
- IMAP4
- MAPI over HTTP
- Offline Address Book
- Outlook Anywhere (RPC over HTTP)
- Outlook Service
- POP3
- Reporting Web Services
- Other clients
ResultType: '0' # string column: "0" is success
condition: selection
falsepositives:
- Multifunction printers, line-of-business applications and old mail clients that still use basic authentication; inventory them, then filter by UserPrincipalName and IPAddress until they are migrated.
level: medium
False positives
- Multifunction printers, line-of-business applications and old mail clients that still use basic authentication; inventory them, then filter by UserPrincipalName and IPAddress until they are migrated.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
First legacy authentication sign-in for an account that used only modern clients
Where some legacy clients are still allowed, a successful legacy sign-in is routine for the accounts that rely on them and a warning for every other account. Microsoft's guidance for privileged accounts names a change in the authentication protocol of a user as a possible sign of attack, because stolen passwords are tried over protocols that cannot ask for MFA.
- Interactive and non-interactive sign-in logs, the previous 30 days: per
UserPrincipalName, theClientAppUsedvalues of successful sign-ins (ResultType0). - New successful sign-ins whose
ClientAppUsedis a legacy client, such as Authenticated SMTP, Exchange ActiveSync, IMAP4, POP3 or Other clients, for an account that had no legacy sign-in in those 30 days. - Read
IPAddressandAppDisplayNameof the sign-in and compare the address with the user's usual addresses. - Alert, first for privileged accounts and for accounts whose earlier sign-ins all used Browser or Mobile Apps and Desktop clients.
LimitsA user who sets up a new phone mail client or a scanner that sends mail produces the same change, so confirm it with the user. Accounts that always used legacy clients are not covered by this hypothesis and stay with the rule. The 30 days are a starting point.
Triage
- Check ClientAppUsed, the application and the IP address; legacy sign-ins from hosting providers or unfamiliar countries are a strong signal.
- Look for failed legacy attempts across many accounts from the same IP address shortly before the success (password spraying).
- Ask the account owner or application owner whether the client is expected; review mailbox rules and sent mail if it is not.
- If malicious, reset the password, revoke sessions and close the protocol for the account.
Response
Once the attack is confirmed:
- Reset the password of the account and revoke its sessions. A successful legacy sign-in means the password is known to whoever signed in.
- Close the path. Disable the protocol for the mailbox and remove the account from the exclusions of the policy that blocks legacy authentication.
- Review the mailbox for inbox and forwarding rules and for mail sent since the sign-in, remove what the attacker created and warn the recipients.
- Check the other accounts the same IP address tried. Handle every account it signed in to in the same way.
- If the account belongs to an application or a device, give it a new credential and move it to OAuth before it is allowed to sign in again.
- Confirm that no further legacy sign-in succeeds for the account in the interactive and the non-interactive sign-in log.
Mitigation
- Block legacy authentication with a Conditional Access policy (or security defaults) for all users, including on the non-interactive sign-in path.
- Disable unused protocols per mailbox (IMAP, POP, SMTP AUTH) and require modern authentication in SharePoint Online.
- Move remaining applications and devices that need SMTP or EWS to OAuth.
Frequently asked questions
Why can MFA not protect a legacy authentication sign-in?
A legacy client authenticates with basic credentials and never shows the Microsoft sign-in page, so MFA cannot be requested. A correct password is enough. The protection is to block these protocols, not to add a second factor.
Basic authentication was retired in Exchange Online, so why do these sign-ins still succeed?
Microsoft has retired basic authentication for most Exchange Online protocols, which is not the same as all of them. A successful legacy sign-in today usually means an exception that someone left open, or an application that still depends on it. Either one is worth finding.
Where else are legacy sign-ins recorded?
In the non-interactive sign-in log. The rule reads the interactive sign-in log, and legacy sign-ins can appear in both. Run the same filter on the non-interactive log for full coverage, which in Microsoft Sentinel is the AADNonInteractiveUserSignInLogs table.
Which legacy sign-ins are usually legitimate?
Multifunction printers, line-of-business applications and old mail clients that still use basic authentication. Make an inventory of them and filter them by UserPrincipalName and IPAddress until they are migrated. A legacy sign-in from a hosting provider or an unfamiliar country is a strong signal in the other direction.
References
- MITRE ATT&CK T1078.004: Cloud Accounts
- Block legacy authentication with Conditional Access
- How to customize and filter identity activity logs (legacy authentication client values)
- Security operations for infrastructure (legacy authentication)
- Security operations for privileged accounts in Microsoft Entra ID (change in legacy authentication protocol)
- AADNonInteractiveUserSignInLogs table reference