Microsoft OAuth Device Code Phishing Hijacks Microsoft 365 Sessions
Social Engineering & Fraud · 1 source · Updated 5mo ago · First seen Jun 2, 2026

Attackers abused Microsoft’s OAuth 2.0 Device Authorization Grant flow to phish users into authorizing attacker-controlled sessions on legitimate Microsoft login pages, allowing them to capture access tokens, refresh tokens, and ID tokens without stealing passwords directly. In the observed campaign, victims received phishing emails, were routed through phishing landing pages and open redirects, and were told to enter attacker-supplied one-time device codes on Microsoft’s official device verification page before completing MFA.
The stolen tokens enabled access to Microsoft 365 services including email, OneDrive, and Teams. Researchers also observed a Brazil-focused variant that used cacoo.com, a legitimate Nulab-owned service, as an open redirect to phishing infrastructure. Recommended mitigations include training users to reject unsolicited device-code requests, reviewing redirect parameters and final destinations, monitoring DeviceCodeSignIn events, enforcing device-compliance controls, and disabling Device Code Flow in Microsoft Entra ID where it is not required.
Why it matters
Impact assessment
This campaign affects organizations using Microsoft 365 and Microsoft Entra ID, especially enterprises whose users can complete OAuth Device Code Flow sign-ins. The impact is high because attackers can obtain valid access, refresh, and ID tokens after the victim completes MFA on Microsoft’s legitimate page, enabling mailbox access, OneDrive file theft, Teams access, and persistent session reuse without password theft.
The exposure is targeted rather than indiscriminate, with observed activity from early April to mid-May 2026 and continued regional adaptation including a Brazil-focused variant. Exploitation in the wild is confirmed by researcher observations of active phishing operations using legitimate Microsoft infrastructure and open redirects to increase credibility.
Affected entities and business risk
- Products/services affected: Microsoft 365, Microsoft Entra ID, Microsoft OAuth 2.0 Device Authorization Grant flow
- User populations affected: users who can authorize device-code logins and complete MFA prompts
- Industries at risk: broad cross-sector enterprise users of Microsoft 365; lures included legal-themed phishing suggesting business-targeted operations
- Business impacts:
- Unauthorized email access and email-sending from victim mailboxes
- OneDrive data exfiltration
- Access to Teams conversations
- Persistent access through refresh tokens
- Reputational and financial risk from account compromise and downstream fraud
Scope and observed activity
- Observed campaign window: early April to mid-May 2026
- Geographic tailoring observed: Brazil-focused variant
- In-the-wild exploitation: yes
- Abuse of legitimate services observed:
- Microsoft official device login page
- cacoo.com open redirect in Brazil-focused activity


