Security & Compliance
ConsentFix: The Phishing Attack That Uses a Real Microsoft Sign-In
Most phishing advice comes down to one instruction: check you are on the real Microsoft sign-in page. ConsentFix is a technique built to make that advice useless. The victim signs in on the genuine Microsoft page, completes their usual MFA, and still hands the attacker a working session.
Push Security first described ConsentFix in December 2025, and in May 2026 the Cloud Security Alliance published research on a third iteration circulating on underground forums, with automated target profiling and token exchange built in. It is no longer a proof of concept. If your Microsoft 365 defences rest on users spotting fake login pages, this is worth fifteen minutes of your attention.
How ConsentFix works
The attack borrows the social engineering of ClickFix, where a web page talks the user into performing a "verification" step themselves, and combines it with OAuth sign-in abuse. As the published research describes it:
- The user lands on a convincing page, often reached through a PDF that links to a document-sharing site, which helps it slip past email link scanning.
- The page asks them to sign in. The button opens a real Microsoft sign-in for a legitimate Microsoft tool, typically the Azure CLI. If they are already signed in, they may simply pick their account.
- Microsoft redirects the browser to a localhost address that contains an authorisation code. The page looks broken, which is expected.
- The phishing page asks the user to copy that address from the browser bar and paste or drag it into a box to "complete verification".
- The attacker exchanges the code for access and refresh tokens, and now holds a session as that user.
No password is stolen and no fake login page is involved. That is the point.
Why your usual controls miss it
Three things make ConsentFix awkward to defend against.
First, the application being abused is Microsoft's own. First-party tools such as the Azure CLI and Azure PowerShell are trusted in every tenant by default, so the consent restrictions you may have placed on third-party apps do not apply to them.
Second, phishing-resistant MFA does not help here. Passkeys and security keys stop attackers relaying credentials through a fake page, but in ConsentFix the user authenticates on the real page. The token is stolen afterwards, through a copy and paste.
Third, the tokens are issued for a command-line tool. Researchers have pointed out that several of these first-party apps sit in known gaps in default logging and Conditional Access coverage, so activity can be quieter than a normal suspicious sign-in.
A layered response
There is no single setting that closes this. The answer is several thin layers that each remove part of the attack's room to move.
Each layer removes part of the attack; together they make a pasted code far less useful.
1. Restrict who can use Microsoft's admin tools
Most staff have no reason to sign in to the Azure CLI or Azure PowerShell. In Microsoft Entra ID you can create the enterprise application (service principal) for each of these tools in your tenant, set "Assignment required" to yes, and assign only the administrators and developers who genuinely use them. Everyone else is refused a token, so a code pasted by a finance assistant is worthless.
Start with the Azure CLI and Azure PowerShell, then review the wider list of first-party tools that researchers have flagged.
2. Bind admin tools to managed devices
Use Conditional Access to block these tools for everyone outside an approved group, and require a compliant, Intune-managed device for the people inside it. An attacker redeeming a stolen code from their own infrastructure then fails the device check.
The admin tool column is where ConsentFix lives, so that is where the restrictions go.
3. Tighten consent for everything else
ConsentFix abuses first-party apps, but classic consent phishing with look-alike third-party apps has not gone away. Limit user consent to apps from verified publishers requesting low-risk permissions (or remove user consent entirely), enable the admin consent workflow so requests land in a review queue, and audit existing app grants for broad permissions nobody remembers approving.
4. Watch for the tell-tale sign-ins
A sign-in to the Azure CLI by someone in sales is unusual in almost any business. Review your Entra sign-in logs for first-party admin tools used by unexpected accounts, and alert on token redemptions from locations or networks that do not match the original sign-in. Shorter session lifetimes for unmanaged devices reduce how long a stolen token stays useful.
5. Update the awareness message
Add one simple rule to your training: a genuine Microsoft sign-in will never ask you to copy the web address and paste it somewhere else. It is concrete, memorable and directly breaks this attack.
Where to start
If you only do one thing this week, find out who in your tenant has signed in to the Azure CLI or Azure PowerShell in the last month, then restrict both to that list. It is a small change with a large effect.
Endpoint Craft helps businesses review Entra ID app access, design Conditional Access that fits how their teams actually work, and tie it to Intune device compliance. If you would like a second pair of eyes on your tenant before an attacker provides one, we would be glad to help.
Get Started
Ready to bring your idea to life?
Get in touch to talk through your goals and find out how Endpoint Craft can help you work smarter, stay secure, and embrace the AI era.
Contact Now →