· via dev.to (home feed)
OAuth consent phishing slips past MFA using Microsoft's real login flow
Attackers are registering multi-tenant Microsoft apps and coaxing users into granting them mail and file access, a pattern that survives password resets and ignores phishing-resistant MFA. Fixes live in Entra ID's consent settings.

How the attack works
A technical guide published on dev.io — dev.to — walks through an attack class that never asks for a password. Instead of harvesting credentials, the attacker registers an ordinary multi-tenant application in Microsoft's identity platform and sends the victim a link to the genuine login.microsoftonline.com authorization endpoint, requesting delegated scopes such as Mail.Read, Files.Read.All and offline_access, with a redirect URI the attacker controls.
Everything the victim sees is authentic. They sign in on Microsoft's real login page, and MFA, Conditional Access and sign-in risk detection all evaluate normally and pass, because as far as the platform is concerned this is a legitimate authorization flow. If the tenant permits user consent for those scopes, clicking Accept creates an oauth2PermissionGrant and an enterprise application, or service principal, in the victim's tenant. The attacker's redirect endpoint receives an authorization code, exchanges it, and holds an access token plus a refresh token.
The nasty part is persistence. According to dev.to, the grant exists independently of the user's password and sessions, so a password reset does not remove it. It is the same refresh-token persistence problem seen in other MFA bypass techniques, except Microsoft itself issued the token to the attacker's client at the user's request.
Variants seen in incident reports
The guide lists four patterns that show up repeatedly. Delegated mail and file access is used for inbox mining and business email compromise. Lookalike display names such as "Microsoft 365 Security Scan" or "Adobe Sign Review" appear with an unverified-publisher banner that users routinely ignore. A compromised tenant holding real Microsoft Cloud Partner Program verification can defeat a "verified publishers only" policy on its own. And app-only permission requests turn the phish toward privileged users, since admin approval grants tenant-wide application access.
Restricting user consent in Entra ID
Entra ID offers three user consent settings: block user consent entirely, allow consent only for verified publishers requesting low-impact permissions, or let Microsoft manage consent, which is the default for new tenants under the microsoft-user-default-recommended policy. The dev.to guide advises checking your tenant's current assignment via Microsoft Graph PowerShell before assuming protection, because the legacy setting (ManagePermissionGrantsForSelf.microsoft-user-default-legacy) lets users consent to nearly anything that does not require an admin.
Disabling user consent completely is the strongest control and suits regulated tenants, but it should be paired with the admin consent workflow so users do not hit dead ends and hunt for workarounds. The middle option — verified publishers and low-impact permissions only — carries two caveats: the verified-publisher signal fails against a hijacked verified tenant, and permission classifications must be reviewed rather than assumed. Mail.Read should never be classified as low-impact in a tenant that cares about mailbox confidentiality.
The admin consent workflow is enabled under Enterprise applications, Consent and permissions, Admin consent settings in the Entra admin center. Users then get a request button instead of a wall, and reviewers see the app, its publisher and the exact scopes. The guide suggests reviewers decline anything combining offline_access with mail or file scopes from an unverified publisher.
Microsoft's risk-based step-up consent escalates consent requests the company flags as risky to admin approval. It only changes behaviour while user consent is enabled, and its BlockUserConsentForRiskyApps setting is managed through the Graph PowerShell beta module with the Privileged Role Administrator role. Dev.to treats it as an extra layer rather than a substitute: the flag is advisory, and attackers iterate until their app stops being flagged.
Detection and triage
Every consent decision writes a "Consent to application" audit event. Forward the AuditLogs table into Microsoft Sentinel or Log Analytics and alert on successful consents that include sensitive scopes. One practical warning from the guide: the scope list's position within the event's modifiedProperties varies by shape, so validate the query against a known consent in your own tenant before wiring it to an alert. Elastic ships a prebuilt rule using a new-terms approach — first-time user-plus-application pairs — which keeps a campaign hitting many users visible rather than collapsing into one alert.
Useful triage pivots include the actor and IP, since one IP consenting for several users within minutes indicates a campaign; publisher status, with unverified publishers requesting mail or file access as the top priority; and the CorrelationId, which joins to SigninLogs for the preceding sign-in and to MicrosoftGraphActivityLogs, if enabled, for what the app did afterwards. Microsoft's own guidance, relayed by dev.to, is to search the Purview audit log for questionable consent activities and review grants in large tenants on a weekly cadence.
Why it matters
This attack class works precisely because nothing about it is fake: the domain is real, the login is real, MFA is genuinely satisfied. Defences built on phishing-resistant authentication do nothing when the victim authenticates as themselves and then clicks Accept. Standard incident response instincts — reset the password, revoke sessions — leave the attacker's grant untouched. The effective countermeasures are tenant-side policy changes in Entra ID, not user vigilance or stronger factors, and tenants that never reviewed their consent settings may be running defaults that leave the door open.
- #security
- #oauth
- #microsoft-entra
- #phishing
- #identity
- #mfa