"Did You Mean to Send Me This?"
On August 6, people started asking me about an email I'd sent them. The subject was "Azure Innovators RFP." I hadn't sent it.
My first thought was spoofing. Someone forges your From address, the message lands in a few inboxes, and your mailbox is never touched. It happens all the time, and the fix is about SPF, DKIM, DMARC, and the recipient's mail filtering.
Then I noticed a second thing. I hadn't received any new email in about 48 hours. For my primary consulting mailbox, that's not a quiet week. That's something changed inside the mailbox.
Spoofing doesn't hide your inbound mail. That second symptom turned a "probably spoofing" question into a probable account compromise, and the investigation confirmed it with high confidence: someone had authenticated sessions to my Microsoft 365 account and used my real mailbox to send that message.
This is the public post-mortem. I'm publishing it because the people who received that email deserve a straight account of what happened, and because the technique is in active use against other tenants right now. The detailed forensic report stays private. This post leaves out recipient identities, IP addresses, tenant, device, and session identifiers, and anything else that would help someone repeat the attack or target the people affected.
If You Received the Email
If the "Azure Innovators RFP" message reached you:
- Delete it. Don't reply, open attachments, follow links, or act on any request in it.
- Receiving it doesn't mean you were compromised. Delivery alone doesn't affect your account or device.
- If you clicked a link, opened an attachment, entered credentials, or approved a sign-in prompt, contact your IT or security team. Review your account's sign-ins and active sessions, and change any password you entered.
- Verify anything unexpected from me by phone or a channel you already trust, not by replying to the fraudulent message.
I've offered no-cost triage and reasonable remediation help to anyone affected by this message. That offer stands. I will never ask you for a password or an MFA code.
The Numbers
| Measure | Count |
|---|---|
| Unique addresses targeted | 351 |
| Delivered | 297 |
| Failed delivery | 54 |
| External addresses notified | 295 |
| Unauthorized devices registered to my account | 5 |
| Other tenant users compromised | None found |
Those numbers come from Exchange Online message trace, deduplicated by recipient. A target list isn't a delivery list, and a delivered message isn't a compromised recipient. Notifying from the trace, rather than from everyone the campaign aimed at, meant nobody was told they'd received something that never arrived.
What Happened
| Date (2026) | Phase | What we saw |
|---|---|---|
| July 22 | Initial access | A device-code-derived sign-in, then two new Windows devices registered to my account within three minutes |
| July 22 | Concealment | An inbox rule hiding mail from one specific correspondent |
| July 23 | Persistence | New device-code-derived session activity that carried through to August |
| August 6 | Renewed access | Three more device registrations, then Outlook on the web from the same session |
| August 6 | Concealment | A second rule moving all incoming mail to Conversation History, marked read |
| August 6 | Campaign | Six sends in under three minutes, two minutes after the rule |
| August 6 | Cleanup | All six sent items moved out of Sent Items, then soft- and hard-deleted |
| August 8–9 | Containment | Passwords changed, refresh tokens revoked, rules removed, devices disabled |
| October 14 | Re-entry attempt | 278 token replays against my account. Every one rejected |
The earliest suspicious activity in the evidence was two weeks before anyone saw a symptom. The attacker got in, set up a quiet rule, waited, came back, and ran the campaign in a single afternoon.
Both rules followed the same pattern: move the mail somewhere I'd never look, mark it read, stop processing further rules. Conversation History is a folder almost nobody opens. On August 6, the broad rule went in eight seconds after the attacker's Exchange tooling started work, and the campaign started two minutes after that. Hiding my inbox wasn't a side effect. It was step one, so replies and "did you send this?" messages would never reach me.
How They Got In: Device Code Flow
Device code flow is a legitimate Microsoft sign-in method. It exists for devices that can't show a full sign-in page: a conference-room display, a command-line tool, a TV. The device shows you a short code, you open a Microsoft page on your phone or laptop, type the code, and sign in. The device that showed the code gets the tokens.
The device that showed the code doesn't have to be yours. In device-code phishing, the attacker starts the flow, gets the code, and gets the victim to enter it. The victim signs in on a genuine Microsoft page, with a genuine certificate, and satisfies their real MFA. The tokens go to the attacker.
That's what makes it effective against security-aware people. We train everyone to check the domain and the padlock. Here, the page is real. The question that matters is whether you started the sign-in the code belongs to.
The sign-ins in my logs showed exactly that pattern:
originalTransferMethodwasdeviceCodeFlow. Entra ID tracks a session's ancestry. Later refreshes and app sign-ins don't show "device code" as their protocol, but this property still records where the session came from. Search only for the protocol and you'll miss most of it.- MFA was "satisfied by claim in the token." The attacker never faced an MFA prompt. MFA wasn't broken. A real MFA result was attached to a session someone else started, and every later use inherited it.
- Device registration followed within seconds. The first sign-in was to the Intune enrollment app, and a generic
DESKTOP-device object appeared less than a minute later. All five unauthorized devices shared the same outdated Windows build, and none was managed or compliant.
What I can and can't say about the first click
I don't recall entering a device code for a sign-in I didn't start, and I won't invent a lure the evidence can't show. No copy of the initial phishing message was found. The logs prove a device-code sign-in succeeded. They don't prove what prompt caused it.
What I can say is this: during part of that window I was working at a technical conference, switching between sessions, conversations, travel, and tenant work. A sign-in prompt that would look wrong in a quiet, deliberate admin session blends in when you're doing five things at once. That's not an excuse. It's a design problem, and it's one of the things I've changed.
The pattern is consistent with the AI-assisted device-code phishing campaigns Microsoft has reported this year, which use RFP, invoice, and shared-file lures. That's context, not attribution. I don't know who did this.
How We Knew It Wasn't Spoofing
Spoofing and authenticated abuse call for completely different responses, so this had to be settled with evidence:
- Exchange auditing recorded six Send operations from Outlook on the web, in my mailbox's context, from the attacker's session. A forged header can't create a Send audit record in your tenant.
- Message trace showed Exchange Online processing the campaign, with the same subject and source as the audit records.
- The rules, device registrations, and sign-ins all carried the same session identifier. That ties July to August far more reliably than IP addresses or geolocation, which describe network egress, not a person.
- The deletion sequence (moved, soft-deleted, then hard-deleted, all within about a minute and a half of the last send) was someone covering tracks in a live session.
One mailbox audit detail deserves a warning. MailItemsAccessed records showed the attacker reading mail during both visits, but those records can aggregate many items into one row. We could prove access. We couldn't produce an honest count of messages read, so we didn't publish one, and we treat confidentiality impact as possible but not quantifiable.
Containment Is More Than a Password Reset
Changing the password was step one, not the finish line. A cloud identity compromise leaves several things behind that a new password doesn't touch:
| Foothold | What we did |
|---|---|
| Password | Changed twice, August 8 and 9 |
| Refresh tokens and sessions | Revoked twice on August 9, which moved the account's token valid-from date past anything the attacker held |
| Five unauthorized device objects | Disabled, not deleted, so their registration history stayed available as evidence |
| Two malicious inbox rules | Removed. Remaining rules checked for moves, forwards, redirects, and deletes |
| Forwarding and delegates | Verified: no forwarding address, no deliver-and-forward, only SELF holding Full Access and Send As |
| App consent | Reviewed. No malicious grants. The only new consent was our own investigation tooling |
| Tenant scope | Tenant-wide review of device-code sign-ins and generic device registrations. No other user affected |
The order matters. Evidence collection ran alongside containment, not after it. Cloud evidence changes under you: sessions expire, rules get removed by your own fix, and logs age out. Every export was recorded in UTC with its query window and hashed, so the private report could stand behind every number in this post.
Notifications went out after containment, one message per recipient, with no links or attachments. Recipients had just been told not to trust a message from this account, so the notice couldn't look anything like the original.
Day 69: They Came Back
On November 6, a routine device inventory during cleanup showed something odd. One of the five devices disabled back on August 9 had a recent approximate last sign-in.
A device-scoped sign-in query turned up four failed attempts on October 14. Searching for that source across every account in the tenant turned up 278 failed token requests, all on October 14, all against my account, in five bursts over 82 minutes. Bursts three to five each fired 68 requests in two seconds or less, from a scripted client.
The attacker was replaying refresh tokens from both original sessions, plus the primary refresh token of one of the disabled devices. They'd held onto that material for 69 days and came back to see if it still worked.
It didn't. Every request failed:
- AADSTS50173 (14 requests): the grant was issued before the user's tokens-valid-from date. That's the August 9 revocation doing its job. Even the device's primary refresh token was refused on token age before Entra got as far as checking that the device was disabled.
- AADSTS70000 (the other 264): invalid grant, consistent with a tool cycling through everything it had stored.
Two things about that day are worth more than the result.
A Conditional Access block on device code flow would have stopped only 14 of the 278 requests, the ones whose tokens still carried device-code ancestry; the rest were ordinary refresh-token redemptions that the block doesn't cover. Every request showed Conditional Access as "not applied" and sign-in risk as "none," because Entra rejected them before issuing anything. Revocation is what held. Blocking the flow prevents the next phish. It does little about tokens an attacker already has.
We found it seven days before the evidence would have disappeared. Entra ID keeps sign-in logs for 30 days. The October attempts were found with a week to spare. Anything between August 9 and October 7 has already aged out, and nobody can review it now. If your sign-in logs only live in Entra, your investigation window is 30 days, whether you know it or not.
After the October evidence was preserved, all five device objects were deleted. Monitoring for the known indicators continues into January.
The Audit You Can Run Today
These checks are read-only. Run them from a privileged access workstation (PAW), signed in with a read-only role such as Global Reader. None of them change anything.
1. Inbox rules that hide, delete, or forward mail
Run it once, against every mailbox, from a PAW:
Connect-ExchangeOnline
$hideFolders = 'Conversation History|RSS|Archive|Deleted Items'
$mailboxes = Get-EXOMailbox -ResultSize Unlimited `
-RecipientTypeDetails UserMailbox, SharedMailbox
foreach ($mbx in $mailboxes) {
Get-InboxRule -Mailbox $mbx.UserPrincipalName -IncludeHidden |
Where-Object {
$_.MoveToFolder -match $hideFolders -or $_.DeleteMessage -or
$_.ForwardTo -or $_.RedirectTo -or $_.ForwardAsAttachmentTo
} |
Select-Object @{ n = 'Mailbox'; e = { $mbx.UserPrincipalName } },
Name, Enabled, MoveToFolder, MarkAsRead, StopProcessingRules
}
How to read the output: a move to Conversation History or RSS, combined with MarkAsRead and StopProcessingRules, is the signature. Legitimate users rarely build that combination, and nobody builds it for every message. Any forward or redirect to an outside address needs an owner who can explain it.
2. Sign-ins that came from device code flow
This uses the beta sign-ins endpoint, because that's where originalTransferMethod lives, and it includes non-interactive sign-ins, where token replay shows up:
Connect-MgGraph -Scopes 'AuditLog.Read.All', 'Directory.Read.All',
'Device.Read.All', 'Policy.Read.All'
$since = (Get-Date).ToUniversalTime().AddDays(-7).ToString('s') + 'Z'
$types = "signInEventTypes/any(t: t eq 'interactiveUser' or " +
"t eq 'nonInteractiveUser')"
$filter = "createdDateTime ge $since and $types"
$uri = 'https://graph.microsoft.com/beta/auditLogs/signIns?$filter=' +
[uri]::EscapeDataString($filter)
$hits = while ($uri) {
$page = Invoke-MgGraphRequest -Uri $uri -OutputType PSObject
$page.value | Where-Object {
$_.originalTransferMethod -eq 'deviceCodeFlow' -or
$_.authenticationProtocol -eq 'deviceCode'
}
$uri = $page.'@odata.nextLink'
}
$hits | Select-Object createdDateTime, userPrincipalName, appDisplayName,
ipAddress, @{ n = 'Error'; e = { $_.status.errorCode } }
Seven days of non-interactive sign-ins can be a lot of rows in a large tenant, so narrow the window or add a userId filter there. Every row should map to something you recognize: a Teams room, an approved CLI tool, a known device. A successful device-code sign-in for a normal user who doesn't use any of those is the thing to chase. A burst of 50173 or 70000 errors against one user is someone trying old tokens.
3. New devices that aren't managed
$cutoff = (Get-Date).AddDays(-30)
Get-MgDevice -All -Property DisplayName, RegistrationDateTime, IsManaged,
IsCompliant, OperatingSystemVersion, TrustType |
Where-Object { $_.RegistrationDateTime -gt $cutoff -and -not $_.IsManaged } |
Sort-Object RegistrationDateTime |
Format-Table DisplayName, RegistrationDateTime, OperatingSystemVersion,
TrustType, IsCompliant
A generic DESKTOP- name isn't suspicious on its own. Windows generates those. Several registrations for one user in a few minutes, all on the same old build, none managed, is. Check who owns each one with Get-MgDeviceRegisteredOwner.
4. Is device code flow actually blocked?
$uri = 'https://graph.microsoft.com/beta/identity/conditionalAccess/policies'
(Invoke-MgGraphRequest -Uri $uri -OutputType PSObject).value |
Where-Object {
$_.conditions.authenticationFlows.transferMethods -match 'deviceCodeFlow'
} |
Select-Object displayName, state,
@{ n = 'Grant'; e = { $_.grantControls.builtInControls -join ', ' } }
You want a policy with state of enabled and a grant of block. If the state is enabledForReportingButNotEnforced, you have a report-only policy, and report-only is a measurement, not a control. That's not hypothetical. Our own block went in as report-only on August 10, exactly as it should, and then stayed that way longer than it should have. Then prove it the only way that counts: attempt a device-code sign-in as a test user who isn't excluded, and confirm it fails with AADSTS53003.
What We Changed
- Device code flow is blocked by Conditional Access for everyone except a narrow, documented exception group and the emergency-access accounts. It was built report-only, tested with What If, then enforced.
- Two cloud-only emergency-access accounts, each with its own FIDO2 security key, excluded from that policy, alerting on every sign-in, and tested with a real sign-in drill rather than a registration report.
- Phishing-resistant authentication for privileged work, done from a PAW, in a dedicated block of time rather than between conference sessions.
- One collector script replaced the pile of investigation snippets. Its default action is read-only. Anything that changes Conditional Access is a separate, explicitly named action that can't run during evidence collection.
- Monitoring for the known indicators continues through January 2027.
The Real Lessons
A real sign-in page doesn't make the sign-in yours. Device-code phishing gets past people who do everything right with URLs and certificates. The only question that protects you is "did I start this?" If a code shows up that you didn't ask for, stop.
A password reset treats one credential. The identity, its tokens, its devices, its mailbox rules, its forwarding, its app grants, and the people it emailed are a connected system. Contain all of it, then verify the current state.
Revocation is the control that got tested. Sixty-nine days later, the attacker tried exactly what they had. Moving the tokens-valid-from date is what turned 278 attempts into 278 failures.
Your investigation window is your log retention. Thirty days of sign-in history is not enough to explain an attack that started two weeks before anyone noticed and came back two months later. Send Entra and Purview logs somewhere they'll be kept.
Disclosure is part of the response. The goal of this post isn't to persuade anyone that a security professional can't be compromised. It's to show what should happen when one is: fast recognition, evidence before conclusions, honest limits, direct notification, and lessons other people can use.
Coming Up
Over the next few weeks I'll go deeper on the pieces this post only summarizes: reconstructing a device-code-derived session from the logs, containment that doesn't destroy your evidence, building emergency access as a tested system, and turning investigation snippets into a repeatable Microsoft 365 incident-response collector.
Received the "Azure Innovators RFP" email and want help checking whether anything came of it, or want a second set of eyes on device code flow in your own tenant? Get in touch.