Consent Phishing: Illicit OAuth Grants and ConsentFix

Attack coverageUpdated

Consent phishing tricks users into granting a malicious OAuth app access to mail and files, no password needed. How illicit grants and ConsentFix work.

Consent phishing tricks a user into approving an attacker's OAuth application on a real consent screen, which gives that app ongoing access to their mail, files, or contacts through the provider's API. No password is stolen, so resetting the password or enforcing MFA does not undo it; the grant itself has to be found and revoked.

Microsoft is blunt about that last point: for an illicit consent grant, "normal remediation steps (for example, resetting passwords or requiring multifactor authentication (MFA)) aren't effective against this type of attack" (Microsoft Learn). And the technique keeps evolving. In December 2025 Push Security published ConsentFix, which pairs a ClickFix-style copy-and-paste prompt with consent phishing. In Push's words, "phishing-resistant authentication controls like passkeys have no impact on this attack."

How consent phishing works

The classic illicit consent grant:

  1. The attacker registers an app with an OAuth provider such as Microsoft Entra ID and gives it a trustworthy name, often copying a popular product.
  2. The lure opens the real consent screen. It is hosted by the identity provider, so the domain and certificate are genuine. The app asks for access to things like mail, files, and contacts.
  3. The user clicks Accept. The app receives an authorization code and exchanges it for an access token and possibly a refresh token.
  4. The app reads data as the user, from the attacker's infrastructure, for as long as the grant exists. Microsoft warns that an accepted grant can expose "mail, forwarding rules, files, contacts, notes, profile" and more (Microsoft).

The ConsentFix variant skips the attacker-registered app entirely:

  1. The victim reaches a compromised, high-reputation website, usually from Google Search, and passes a fake Cloudflare Turnstile check that asks for their email address.
  2. Clicking "Sign In" opens a genuine Microsoft sign-in URL for Azure CLI. If the user is already signed in, they just pick their account.
  3. The browser is redirected to localhost, leaving an address bar URL that contains an OAuth authorization code.
  4. The page asks the victim to copy that URL and paste it back. The attacker redeems the code and holds tokens for the victim's account.

Because Azure CLI is a first-party Microsoft app, Push notes it "is implicitly trusted in Entra ID," so the consent restrictions you set for third-party apps do not apply.

Real-world examples

  • ConsentFix (December 2025). Push published the campaign along with log hunting guidance, including the Azure CLI application ID 04b07795-8ddb-461a-bbee-02f9e1bf7b46.
  • Malicious apps disabled by Microsoft. Microsoft's consent phishing guidance describes how it reviews flagged OAuth apps and, when a violation is confirmed, disables them across all Microsoft services. Existing access tokens stay valid until they expire, so disablement alone is not a cleanup.

Warning signs and detection signals

  • A consent prompt for an app nobody requested, from an unverified publisher, asking for broad read or write access.
  • An app name that imitates a known product, or spelling and grammar errors on the email or consent screen.
  • Any page asking the user to copy a URL out of the address bar, especially a localhost URL, and paste it somewhere.
  • Consent to application events in the audit log, particularly with IsAdminConsent set to True when you did not expect it.
  • Non-Microsoft apps holding tenant-wide (AllPrincipals) consent.
  • Azure CLI sign-ins by users who are not administrators or developers, and non-interactive sign-ins from unfamiliar IPs right after an interactive one.

How Surface stops it

  • Consent screen control. Surface keeps an OAuth app inventory and can warn or block at the consent screen. This covers Microsoft sign-in only. Google and GitHub consent screens are not covered today, so use those providers' own app access controls.
  • ConsentFix detection. Surface Vision detects ConsentFix alongside ClickFix, FileFix, and pastejacking, on the page where the copy-and-paste request happens.
  • Kit signatures. Categories include OAuth impersonation and SSO phishing, with lookalike-domain and cloned-page checks for the lure pages that lead to the consent step.
  • Runs locally. Detection works in the browser and keeps working if the Surface server is down.

See phishing and social engineering defense for how these layers fit together.

If it already happened

  1. Find the grant. In the Entra admin center, open the user's Applications list, or run the Get-AzureADPSPermissions.ps1 script that Microsoft's guidance links, which exports every consent grant in the tenant.
  2. Revoke it. Remove the app assignment, or use Remove-MgOauth2PermissionGrant and Remove-MgServicePrincipalAppRoleAssignment. For ConsentFix, the tokens were issued to Microsoft's own Azure CLI app, so revoke the user's sign-in sessions and refresh tokens rather than hunting for a rogue app.
  3. Scope the access. Search the audit log for what the app touched and when. This only works if mailbox and activity auditing were on before the attack.
  4. Clean up after it. Check for forwarding rules, new apps, and mail sent from the account.
  5. Harden consent. Limit user consent to verified publishers and low-risk permissions, and route the rest through admin approval.

Related techniques: device code phishing, AiTM phishing, and session hijacking.