This is a focused escalation, not a broad threat briefing.
The question for us is simple but uncomfortable: do three unsolicited device-code prompts give us enough confidence to break tenant-wide device-code flow tonight, knowing we will disrupt meeting-room devices and two legacy CLI integrations? Or is the better SOC decision to constrain device-code authentication to managed devices immediately, then hunt hard for already-redeemed tokens?
I want us to resolve four things fast: first, whether this looks like active EvilTokens-style token capture or just probing; second, whether conditional access actually closes the path we care about; third, what evidence would force us from “constrain” to “disable”; and fourth, what the shift lead should tell leadership in the next hour.
Alex, I’ll want the exploit and kill-chain threshold. Lena, attribution is secondary here, but campaign confidence matters. James, you close on the defensible containment path. Pierre, quantify the operational pain of disabling tonight. Sofia, only weigh in if the response changes notification or audit posture. Elena, keep us honest if this overlaps with broader targeting, but let’s not overstate state interest unless the evidence earns it.
We have three staff reports of unsolicited OAuth device-code prompts matching EvilTokens-style phishing. Take the SOC shift-lead view: what evidence distinguishes attempted lure from successful device-code token redemption? Name the Entra/M365 log artifacts, hunting pivots, and the threshold that would justify tenant-wide disabling tonight rather than constrained containment.
Lena, I’d separate this cleanly: a prompt is not token theft. It’s a lure until Entra shows the user actually completed the device-code flow.
For the SOC lead, the dividing line is:
- Attempted lure: user reports a code prompt/link/QR, but Entra has no matching successful sign-in using Authentication Protocol = Device Code or device-code transfer evidence for that user around the report time.
- Successful redemption: Entra shows a successful device-code sign-in. Microsoft’s own Entra guidance flags this as
Status=SuccesswithAuthentication Protocol=Device Code; Silverfort describes the two-part artifact as the interactive sign-in where the user approves the code atmicrosoft.com/devicelogin, followed by non-interactive sign-ins where the token is handed to the polling client. That second part is the smoke.
Hunt pivots tonight:
SigninLogs/ Entra sign-in logs:AuthenticationProtocol == deviceCodeor equivalent device-code-flow fieldStatus == Success- affected
userPrincipalName session_idsource IPuser agentresource_display_name- app/client context, especially Microsoft Authentication Broker requesting Office resources like Exchange Online, Microsoft Graph, or SharePoint, per Elastic’s detection writeup
- Correlate interactive and non-interactive sign-ins for the same user/session shortly after the staff report.
- Check M365 Unified Audit Log and Microsoft Graph activity logs for post-token activity against SharePoint, Teams, Azure, Exchange/Microsoft Graph resources.
- Look for rapid Entra audit/device-registration sequences: Elastic notes same-correlation-ID events inside about a minute can indicate scripted post-phish registration using a refresh token.
- Review Conditional Access and MFA satisfaction details for the same
session_id.
Threshold for tenant-wide disabling tonight: not three prompts. That’s noise until redemption closes the chain. I’d go tenant-wide only if one of these is true: you confirm successful unexpected device-code sign-ins and you have no legitimate device-code dependency; you see multiple users with successful device-code redemption; or you see follow-on non-interactive token use against Graph/Exchange/SharePoint/Teams after approval. If it’s just reports with no successful device-code sign-in, contain narrowly: interview users, revoke sessions for anyone who entered a code, block the lure infrastructure, and keep the hunt running. Don’t swing the axe unless the token actually got minted.
Assess the control decision: disable OAuth device-code flow tenant-wide tonight, breaking meeting-room devices and two legacy CLI integrations, versus constraining device-code flow through Conditional Access to managed/compliant devices only. Does CA-to-managed-devices actually stop EvilTokens-style abuse? What are the bypasses, exceptions, and fastest safe policy design for tonight?
Halil, I would not rely on “device-code only from managed/compliant devices” as the control tonight. Microsoft’s own Conditional Access documentation says that for the OAuth device-code flow, the managed-device / device-state grant control isn’t supported. So if the policy design is “allow device-code if compliant,” that is not a reliable EvilTokens mitigation.
The right emergency design is: block OAuth device-code flow by default, then carve out the smallest operational exceptions. Microsoft explicitly calls device-code flow high-risk, says it can be used in phishing and unmanaged-device access, and recommends blocking it wherever possible. The EvilTokens-style chain is exactly why: attacker starts the device-code flow, victim enters the code on a legitimate Microsoft page and completes MFA, and the token is returned to the attacker’s original device. MFA completion does not prove the token is landing on the user’s device.
For tonight, I’d do this:
Conditional Access policy 1: Block device-code flow
- Authentication flow condition: device code flow
- Users: all users
- Grant: block
- Exclusions: only a temporary emergency group for known meeting-room / legacy CLI accounts
Conditional Access policy 2: Narrow exceptions
- For meeting-room devices: follow Microsoft’s pattern — allow only the relevant room-device population, ideally tied to specific platform and trusted network location. Microsoft gives the example of Android-based conference-room devices being allowed only from a specific network location.
- For the two legacy CLI integrations: give them a short-lived exception, but treat it as compensating-risk, not “safe.” Put a sunset on it, monitor every device-code sign-in, and move them to auth-code with PKCE or workload identity as fast as possible.
Immediate cleanup
- Revoke sessions and refresh tokens for any users who may have interacted with suspicious device-code prompts.
- Hunt for device-code grant events, especially unusual users or non-compliant devices; Elastic specifically flags first-time OAuth device-code grants from non-compliant devices as a strong early phishing indicator.
So my answer is: disable tenant-wide by default tonight, with narrow CA exceptions for the devices you can actually name and constrain. Do not sell “managed/compliant device only” as stopping EvilTokens; the device-code flow breaks that trust assumption.
Convert this into a same-shift containment plan. Assume three unsolicited prompts and possible EvilTokens-style token theft. What should the SOC do in the first 30, 60, and 240 minutes: policy change, token/session revocation, account isolation, detections, comms, and rollback criteria? Make a call between tenant-wide disable and managed-device-only constraint unless specific evidence changes it.
My call: tenant-wide block/disable the risky flow now, not “managed-device-only.” Microsoft’s own guidance says device code flow is high risk and recommends blocking it where possible; more importantly, the managed-device/device-state grant control is not supported for device-code OAuth flow, so “managed-device-only” is not a reliable containment line here.
First 30 minutes — stop the bleed. Create/emergency-enable a Conditional Access policy blocking device code flow tenant-wide, with only pre-approved break-glass exclusions. For the three prompted users: block sign-in, revoke refresh tokens / sessions, preserve Entra sign-in logs, audit logs, mailbox audit, and Defender alerts before cleanup. Search immediately for Consent to application, new OAuth grants, risky scopes like offline_access, Mail.Read, User.Read, admin consent, and new inbox rules. Comms: tell Help Desk and exec assistants not to approve device-code/MFA prompts and route any prompt reports to SOC, not IT chat.
By 60 minutes — contain identities and apps. Remove suspicious app consent grants, disable or delete unknown enterprise apps/service principals after preserving AppId, publisher, scopes, consenting user, IP, user-agent, and timestamps. Keep affected accounts blocked until password reset, MFA re-registration review, token/session revocation, and mailbox rule review are complete. Deploy high-signal detections: successful device-code auth, successful Consent to application, new OAuth grant with offline_access or mail scopes, mailbox rule creation after suspicious sign-in. Expect some false positives on consent events — roughly 10–25% in busy SaaS environments — so triage by risky scopes and unsanctioned app IDs first.
By 240 minutes — controlled recovery. Re-enable users only if no new suspicious sign-ins, no unauthorized OAuth grants remain, mailbox rules are clean, and user confirms the prompt was not expected. Keep the tenant-wide device-code block in place unless a named business app breaks; rollback should be exception group only, time-bound, owner-approved, and monitored for AADSTS530036/device-flow failures and new consent attempts. If Legal/Sofia has a notification clock running, freeze evidence and produce an initial affected-user/app list inside the same shift.
Put today’s signal in campaign context without over-attributing. Public corpus shows EvilTokens/ARToken/Jalisco-like kits abusing Entra/OAuth device-code flows for token theft and BEC. Do three staff reports matching that pattern raise this to active campaign confidence for the tenant? What indicators would increase or lower confidence, and what targeting assumptions should the SOC avoid?
Alex, I’d raise this to suspected active targeting of the tenant, not yet “active campaign inside the tenant.” Three staff reports matching EvilTokens/ARToken/Jalisco-style device-code/OAuth abuse give me moderate confidence in targeting only if they cluster in time and lure mechanics; active compromise confidence stays low until Entra logs show successful device-code grant, token issuance/refresh, consent, rogue device enrollment, or post-auth mailbox/BEC activity.
What would increase confidence: shared lure infrastructure, real-time device-code generation, Cloudflare Workers-style hosting or EvilTokens-like headers, the same app/client IDs, repeated source IP/UA patterns after authentication, refresh-token use, or Entra device enrollment/PRT artifacts. What would lower it: users only reporting lookalike lures without entering codes, no corresponding Entra sign-in/token events, unrelated sender infrastructure, scattered timing, or evidence this was awareness-training/simulation noise.
The SOC should avoid three assumptions: don’t call it a named actor campaign from kit similarity alone; don’t assume MFA was “bypassed” because it was absent—the public reporting says these flows abuse legitimate Microsoft/OAuth device authorization; and don’t assume executive or sector-specific targeting from three reports. My ATT&CK read: T1566 phishing, T1528 steal application access token, T1078 valid accounts; add mail/BEC techniques only if mailbox activity is confirmed.
The key distinction that sharpened here is that an unsolicited device-code prompt is not, by itself, proof of token theft. Alex drew the SOC line at successful Entra evidence: a completed device-code sign-in, especially Status=Success with Authentication Protocol=Device Code, followed by non-interactive activity where the issued token is used by the polling client. That gives the room a practical way to separate “lure reported” from “credential/session material likely landed with the attacker.”
On the control side, Marcus and James converged strongly: the “middle path” of allowing device-code flow only from managed or compliant devices should not be treated as dependable containment tonight, because Conditional Access device-state or managed-device grant controls are not supported for this OAuth device-code flow in the way we would need. Their recommendation is therefore more aggressive: block device-code flow tenant-wide, with only narrow, temporary, pre-approved exceptions for the meeting-room devices and legacy CLI integrations that truly cannot function otherwise.
James translated that into same-shift operations: stop the flow quickly, isolate the three reported users, revoke sessions and refresh tokens, preserve sign-in/audit/mailbox evidence, hunt for OAuth consent grants and suspicious scopes, remove malicious app grants only after capturing identifiers, and communicate clearly so users do not approve prompts through side channels. Lena added the campaign framing: three reports are enough for suspected active targeting if they cluster in time and technique, but not enough to claim active compromise or attribute to a named kit or actor without token issuance, consent, refresh activity, mailbox/BEC behavior, shared infrastructure, or other corroborating artifacts.
The next turn should tighten one unresolved point: how the SOC should set its evidentiary threshold when the containment control decision is already leaning toward a tenant-wide device-code block. In particular, Alex’s earlier “successful redemption” threshold is useful for proving compromise, but Marcus and James are saying the control plane cannot safely rely on managed-device restrictions. So we need to test whether the hunting threshold, containment threshold, and business-disruption threshold should be deliberately different tonight.
Alex, challenge your prior threshold. Marcus and James both say the proposed middle path — allow device-code only from managed/compliant devices — is not supported/reliable for OAuth device-code flow. If that is true, does your recommendation change from narrow containment to block-by-default with time-bound exceptions, even if we have only three prompts and no confirmed successful redemption yet? Give the exact evidence that would let you safely avoid that.
Halil, yes — if Marcus and James are right, my threshold moves. The “allow only from managed/compliant devices” middle path is not a safe control here: Microsoft says that with device-code OAuth flow, the grant control for managed device/device state is not supported. So I would not treat that as containment. That’s like putting a turnstile on the wrong door.
Given three live prompts and no reliable middle control, I’d shift to block device-code flow by default tonight, with short-lived named exceptions. Microsoft itself describes device-code flow as high-risk and recommends blocking it wherever possible; Microsoft-managed Conditional Access includes a Block device code flow policy, with scoped exception guidance for things like Teams devices. That does not require confirmed redemption. The attack chain is already one user mistake away from token issuance.
The exact evidence that would let me safely avoid that broader block is narrow:
- Entra sign-in logs filtered on Authentication Protocol = Device Code show no
Status=Successfor the three users and no suspicious tenant-wide successful device-code sign-ins in the lookback window. - Conditional Access results show an existing enforced policy already blocking device-code flow, not merely report-only.
- Any successful historical device-code use is mapped to a documented business dependency — for example Device Registration Service or known Teams-device enrollment — with named users/devices/groups and owners.
- No follow-on non-interactive token use against Graph, Exchange, SharePoint, Teams, or Azure resources for those users after the reported prompts.
If you can’t produce that package quickly, block it. Time-box exceptions. Revoke sessions for anyone who may have entered a code. Then hunt. The risk is not the prompt; the risk is a refresh token walking out the side door.
What changed is Alex’s containment threshold. He is no longer treating “allow device-code flow only from managed or compliant devices” as a workable middle option. If the device-state Conditional Access grant is not supported for OAuth device-code flow, then that control cannot carry the risk decision. His metaphor was useful: it is a turnstile on the wrong door.
That pushes the room from a narrow “watch the three users and contain if redeemed” posture toward a broader default block, at least temporarily. Alex’s reasoning is that three live prompts mean the attack is already close to token issuance; waiting for confirmed successful redemption may be too late if there is no reliable intermediate control. He also anchored that shift in Microsoft’s own framing: device-code flow is high risk, and blocking it where possible is a recommended defensive stance, with carefully scoped exceptions for legitimate use cases such as certain Teams devices.
The caveat is important: Alex did not say every reported prompt proves compromise. His earlier evidentiary line still matters for incident classification. Successful Entra sign-in evidence with Authentication Protocol = Device Code remains the cleaner indicator that a token was actually issued and then potentially abused. But for prevention tonight, his bar is lower than his bar for declaring compromise. If logs show no successful device-code sign-ins for the three users and no suspicious successful device-code activity across the tenant, that would reduce urgency; it would not make the managed-device compromise control reliable.
So the discussion now turns from “what should this one SOC do tonight?” to “what does this imply operationally across the industry?” If the compromise path many teams would instinctively reach for is not dependable, Pierre needs to help us weigh the blast radius: who breaks when device-code flow is blocked by default, which sectors are most exposed to this tradeoff, and how organizations should communicate the exception model without creating a permanent bypass culture.
Pierre, assume the identity/defense team now says the proposed compromise — device-code flow only from managed/compliant devices — is not reliable because device-state CA controls are not supported for OAuth device-code flow. The realistic choices tonight are: A) block device-code flow by default with temporary, named exceptions for meeting-room devices and two legacy CLI integrations; B) fully disable with no exceptions and accept breakage; or C) keep device-code flow broadly open while hunting. Quantify the operational pain and risk of each, including meeting impact, integration risk, support load, and board-facing exposure. Give one recommendation.
James, that changes the economics. Microsoft’s own Conditional Access guidance says managed-device/device-state grant controls are not supported for OAuth device-code flow, so the “compliant devices only” compromise does not buy us the control we thought it did. And the attack path is not theoretical: the device-code phishing pattern lets a victim complete Microsoft login/MFA on a legitimate page while the attacker receives the token.
My board-level read:
| Choice | Operational pain tonight | Integration / support load | Board-facing exposure |
|---|---|---|---|
| A) Block by default, named temporary exceptions | Moderate. Meeting-room devices and 2 legacy CLI integrations need allow-listing and validation. | Plan for a concentrated support spike around rooms/CLI owners, not all users. Cost model: tickets × 0.5 hr × loaded support rate plus 2 integrations × owner test hours. |
Lowest acceptable risk. Exposure is narrowed to named accounts/devices; board story is defensible: “we blocked the known-bypass flow and accepted controlled exceptions.” |
| B) Fully disable, no exceptions | High. Any meeting-room or CLI dependency breaks until reworked. | Lowest security exception burden, but highest business disruption. Cost model: failed meetings × attendee hours × loaded rate plus integration outage cost. |
Strongest security posture, but if executive/customer meetings or production CLI jobs fail, this becomes an avoidable operations incident. |
| C) Keep broadly open while hunting | Low immediate pain. | Low help desk load tonight. | Worst board answer. Hunting does not remove the token-issuance path; if abused, the question becomes: “Why was a known unsupported control left broadly open?” |
My recommendation is A tonight: block device-code flow by default, create named, time-boxed exceptions only for the meeting-room identities and the two legacy CLI integrations, and require owners for each exception. Put a 7-day expiry on exceptions and report tomorrow: number of exceptions, number of failed sign-ins, business breakages, and plan to eliminate the CLI dependency. I would not choose C; that is saving help-desk pain tonight in exchange for materially worse identity-loss exposure.
Pierre has sharpened the business choice: if managed-device or device-state Conditional Access controls do not apply to OAuth device-code flow, then the earlier “allow it only from compliant devices” option is not a real risk reduction. That turns this from a tuning question into an exception-management question. The defensible path, in his view, is not to leave the flow broadly available and hope device compliance contains it, but to block by default and carve out only named temporary exceptions where the business can prove a dependency.
The important board-level framing is that this is not just theoretical exposure. In the device-code phishing pattern, the user may still complete Microsoft login and MFA on a legitimate Microsoft page, while the attacker obtains the resulting token on the other side. So the room should treat “MFA happened” as insufficient comfort for this specific flow. Pierre’s operational read is that blocking with exceptions creates moderate pain tonight: meeting-room devices and two legacy CLI integrations may need validation and allow-listing, with a concentrated support spike around those owners. But compared with leaving the bypassable flow broadly reachable, that pain is more explainable and more controllable.
There are still caveats. We have not, in this action, validated every affected room system, script, CLI workflow, or service owner. Pierre’s support estimate is a planning model, not a measured outage forecast. And the exception list must not become a vague category like “all legacy tools” or “all conference rooms” without ownership and expiry.
That is why the next turn needs to become very concrete. The room has essentially accepted the risk logic for “block by default with named temporary exceptions”; now Marcus needs to translate that into a tonight-safe Entra and Conditional Access pattern — exactly what to target, what to exclude, what not to exclude, and how to avoid creating a broader hole while trying to keep critical rooms and integrations alive.
Marcus, give the exact tonight-safe Entra/Conditional Access implementation pattern for blocking device-code flow by default with exceptions. Include what to exclude, what not to exclude, how to handle meeting-room devices and legacy CLI integrations, validation steps, and rollback criteria.
Halil, tonight-safe pattern is block device-code flow as a tenant default, then make named, temporary exceptions — not “allow if managed/compliant.”
Policy 1 — Block OAuth device-code flow by default
- Conditional Access → New policy:
BLOCK - Device code flow - Default - Users: include all users
- Exclude:
- emergency / break-glass accounts
- one tightly controlled group:
EXC-DeviceCode-Temporary
- Target resources: all cloud apps
- Exclude cloud app/resource: Device Registration Service, if your tenant uses device-code flow for device registration
- Conditions → Authentication flows: Device code flow
- Grant: Block access
- Start in report-only briefly, check sign-in logs for device-code events, then enforce tonight if the only hits are known room devices / CLI users.
What not to exclude
Do not exclude all admins, all meeting-room accounts, all Teams users, Office 365 broadly, “trusted locations” by itself, or whole legacy-operations groups. Also do not assume this handles service principals: Microsoft notes user-scoped Conditional Access policies do not block service principal calls, so if the CLI integration is workload/service-principal based, handle it with managed identity or workload identity controls, not this user CA policy.
Meeting-room devices
For Teams / meeting-room devices that genuinely require device-code flow, Microsoft’s pattern is to scope the exception to specific Teams device resource accounts and exclude the Device Registration Service from the block policy. Put only those room resource accounts into EXC-DeviceCode-Temporary; if possible, pair the exception with trusted network/location constraints in a separate allow policy, but don’t make location the primary trust boundary.
Legacy CLI integrations
If the two CLI integrations are human interactive device-code logins, add only the named accounts that run those workflows to the exception group, set an expiry owner, and require migration to auth-code + PKCE or workload identity. If they are service-principal/client-credential flows, this device-code CA block is not the control path; move them to managed identities or workload identity federation.
Validation and rollback
Before enforce: filter Entra sign-in logs for authentication protocol = device code flow and confirm expected users/resources. After enforce: verify normal browser/mobile sign-ins still work, meeting-room devices can reauthenticate if in the exception group, and CLI jobs either succeed by exception or fail safely. Roll back only by adding a named account to EXC-DeviceCode-Temporary, not by disabling the block policy tenant-wide, unless emergency access itself is blocked.
Marcus has turned the control into an implementable tonight pattern: create a tenant-wide Conditional Access policy that blocks the OAuth device-code authentication flow for all users and all cloud apps, then exclude only break-glass accounts and one tightly governed temporary exception group. That is the key operational move. The exception is not “admins,” not “Teams users,” not “trusted locations,” not broad meeting-room populations, and not an entire legacy operations group. It is a named group whose membership can be justified, reviewed, and removed.
The important nuance is the one narrow resource exclusion he called out: Device Registration Service, if the tenant actually depends on device-code flow for device registration. That is different from excluding Office 365 or whole user categories. His validation sequence is also practical for tonight: start the policy in report-only, look specifically at sign-in logs for device-code events, identify whether the hits are expected meeting-room devices or legacy CLI users, and then enforce if the observed impact is understood. The room should treat “known room device” or “legacy CLI user” as a prompt for a temporary exception decision, not as a reason to leave the flow open tenant-wide.
There is still an important caveat around non-user workload patterns. Marcus flagged that user-scoped Conditional Access is not the same thing as controlling service principal activity, so if an integration is really workload or service-principal based, this policy may not be the right enforcement point. That distinction matters before anyone promises total coverage from a user Conditional Access rule.
With the technical containment path now concrete, the next question naturally shifts to the SOC floor: if analysts see several unsolicited device-code prompts but do not yet have proof of token redemption or account compromise, what should they do legally and procedurally tonight? Sofia can help translate that gray zone into notification, evidence preservation, and escalation guidance without overstating what is known.
Sofia, keep this practical for the SOC shift lead. For three unsolicited EvilTokens-style device-code prompts, with no confirmed successful token redemption yet, what are the legal/regulatory and audit obligations? Then state what changes if Entra logs show successful device-code redemption followed by mailbox, SharePoint, Teams, or Graph access. What should be preserved tonight?
For the SOC shift lead: with three unsolicited EvilTokens-style device-code prompts and no confirmed successful token redemption, I would treat this as a security incident / phishing attempt, not yet a confirmed GDPR personal-data breach notification event. The legal obligation tonight is to document the assessment: when detected, which users, whether any code was entered, whether Entra shows redemption, and why Legal/Privacy concluded no notification yet. Under the EDPB’s GDPR breach-notification guidance, the controller must establish promptly whether a personal-data breach has occurred; GDPR Article 33 notification only applies where there is a personal-data breach and risk to individuals. Do not notify regulators on prompts alone unless logs show unauthorized access, disclosure, or other compromise.
If Entra shows successful device-code redemption followed by mailbox, SharePoint, Teams, or Graph access, the posture changes materially. EvilTokens-style device-code abuse is reported to yield access/refresh tokens and Microsoft 365 access; if the accessed content includes personal data, open the GDPR Article 33 clock: notify the supervisory authority without undue delay and, where feasible, within 72 hours after becoming aware, unless the breach is unlikely to risk individuals’ rights and freedoms. If the exposure is likely to create high risk—for example sensitive HR, finance, health, identity documents, or broad mailbox access—assess GDPR Article 34 data-subject notice “without undue delay.” If the company is an SEC registrant, start materiality assessment immediately; an Item 1.05 Form 8-K is generally due four business days after determining the incident is material.
Preserve tonight: original phishing messages/prompts/screenshots; user statements and timestamps; Entra sign-in and audit records for the affected users; evidence of device-code redemption or failure; token/session revocation actions; conditional-access and MFA logs; mailbox audit logs; SharePoint/OneDrive file access; Teams activity; Graph API calls; inbox-rule changes; forwarding/delegation changes; and all containment decisions. Keep a clear “attempt-only vs confirmed access” decision log—auditors and regulators will ask why notification was or was not triggered.
Sofia has drawn a clean line for the SOC shift lead: three unsolicited EvilTokens-style device-code prompts are enough to treat as a security incident and phishing attempt, but not enough by themselves to declare a GDPR personal-data breach notification event. The work tonight is evidence discipline: identify the affected users, capture when the prompts appeared, determine whether any user entered a code, check whether Entra shows redemption, and record why Legal or Privacy is not notifying yet.
The important regulatory point is that “attempted social engineering” and “confirmed unauthorized access to personal data” are not the same threshold. Sofia is not saying the prompts are harmless; she is saying the organization needs to establish promptly whether a personal-data breach occurred. If there is no confirmed token redemption and no evidence of access, the defensible obligation is documentation, triage, and continued monitoring — not premature regulator notification based only on prompts.
The situation changes sharply if Entra logs show successful device-code redemption followed by access to mailbox, SharePoint, Teams, Graph, or similar Microsoft 365 resources. At that point, if the accessed content includes personal data, the incident may move into GDPR Article 33 territory, with the supervisory authority notification clock becoming relevant. The caveat is still evidence-based: successful token redemption alone tells us an identity control failed; the breach analysis depends on what was accessed, whose data was involved, and what risk to individuals can reasonably be inferred.
That sets up the next question well. We have a legal threshold that depends heavily on whether redemption and access occurred, and we have an operational control proposal on the table: allowing device-code flow only from managed or compliant devices. Before anyone treats that as a safe middle path, we need to test whether device-state Conditional Access actually applies reliably to this OAuth flow in the way people assume.
Claim: The proposed middle path — allow OAuth device-code flow only from managed/compliant devices — is not a reliable mitigation because managed-device/device-state Conditional Access grant controls are unsupported for device-code flow.
Counter-evidence: A corpus search confirmed device-code phishing/block guidance but did not clearly surface the exact Microsoft documentation snippet proving the unsupported managed/compliant-device grant-control limitation. The SOC escalation brief needs this anchored precisely, not repeated as lore.
Halil, I’ll be direct: I stand by the position, and the precise anchor is Microsoft’s Conditional Access grant-control documentation: “When you use the device-code OAuth flow, the required grant control for the managed device or a device state condition isn't supported.” That is the line the SOC brief should cite.
The implication is narrow but important: Conditional Access can block device-code flow, but the proposed middle path — “allow device-code only if the user is on a managed/compliant device” — should not be treated as a reliable control. Microsoft separately says device-code flow is high-risk, can be used in phishing or to access corporate resources from unmanaged devices, and recommends getting as close as possible to a unilateral block.
So the corrected wording for the escalation brief should be: Do not implement managed/compliant-device grant controls as the primary mitigation for OAuth device-code phishing. Use Conditional Access Authentication flows to block device-code flow by default; handle Teams room devices and other required use cases through explicit exception groups and, where needed, exclude Device Registration Service to avoid registration impact.
If someone shows a lab where a compliant-device policy appeared to affect a device-code sign-in, I would treat that as a side-effect of another condition or resource policy, not as proof that “managed/compliant only” is a valid device-code control. The Microsoft-documented limitation is explicit enough for the tonight decision.
Marcus has narrowed the control decision in a way that matters operationally: Conditional Access can be used to block device-code flow, but “allow it only from managed or compliant devices” is not a dependable middle path. The key Microsoft documentation line he is anchoring on is that, for OAuth device-code flow, the required grant control for a managed device or device state condition is not supported. That changes the SOC brief from a balanced-sounding compromise into a more explicit recommendation: block device-code flow by default where possible, rather than relying on device compliance as the gating mechanism.
The caveat is important here. We are not saying Conditional Access is useless against this pattern. Marcus is saying the specific mitigation design being proposed — device-code flow permitted only when the device is managed or compliant — should not be represented to leadership as reliable. The practical version is closer to: use Conditional Access Authentication flows to block device-code flow, then carve out tightly governed exception groups for legitimate dependencies such as Teams room devices or other known workflows. He also flagged that Device Registration Service may need special handling to avoid registration side effects, so this is not a casual “flip the switch everywhere tonight” recommendation without impact review.
For the room, this sharpens the incident response path. If EvilTokens-style prompts are appearing, the control conversation should not distract the shift lead into checking whether the user’s endpoint was compliant as though that would settle the exposure question. The decisive questions remain: did anyone complete the device-code flow, did Entra record a redemption, were tokens issued, and were those tokens then refreshed or used against corporate resources?
That is exactly why the discussion now turns from policy design to hunting. We have clarified that the preferred mitigation is blocking or tightly excepting the flow, but the immediate SOC need is evidence: what log pivots can prove whether this was only prompting, or whether there was successful OAuth device-code redemption and follow-on token activity.
Alex, give me the minimum viable hunt pack for the shift lead: 6-8 log pivots or KQL-style checks to find successful device-code redemption, token refresh/use, suspicious OAuth consent/app grants, and mailbox/Graph follow-on. Keep field names cautious where tenants differ, but make it executable enough for Entra/M365 SOC analysts tonight.
Halil, here’s the minimum viable hunt pack I’d hand the shift lead. Treat field names as “close enough” — Sentinel schemas drift by connector and license.
let lookback = 24h;
let users = dynamic(["[email protected]","[email protected]","[email protected]"]);
1) Confirm successful device-code redemption — not just a lure.
SigninLogs
| where TimeGenerated > ago(lookback)
| where UserPrincipalName in~ (users)
| where tostring(AuthenticationProtocol) =~ "deviceCode"
| where ResultType == 0 or tostring(Status) has "success"
| project TimeGenerated, UserPrincipalName, AppDisplayName, AppId,
ResourceDisplayName, IPAddress, Location, UserAgent,
ConditionalAccessStatus, CorrelationId, SessionId
2) Find interactive approval plus polling/token handoff mismatch. Silverfort’s core signal is joining interactive device-code sign-in to non-interactive polling on CorrelationId, then looking for IP/UA mismatch.
let interactive =
SigninLogs
| where TimeGenerated > ago(lookback)
| where tostring(AuthenticationProtocol) =~ "deviceCode"
| where IsInteractive == true
| project CorrelationId, UserPrincipalName, ApproveTime=TimeGenerated,
BrowserIP=IPAddress, BrowserUA=UserAgent, AppDisplayName, ResourceDisplayName;
let polling =
AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(lookback)
| project CorrelationId, PollTime=TimeGenerated, PollingIP=IPAddress,
PollingUA=UserAgent, PollingApp=AppDisplayName, PollingResource=ResourceDisplayName;
interactive
| join kind=inner polling on CorrelationId
| where BrowserIP != PollingIP or BrowserUA != PollingUA
| project ApproveTime, PollTime, UserPrincipalName, BrowserIP, BrowserUA,
PollingIP, PollingUA, AppDisplayName, PollingApp,
ResourceDisplayName, PollingResource, CorrelationId
3) Hunt known device-code broker pattern. Water Security specifically calls out Microsoft Authentication Broker app ID 29d9ed98-a469-4536-ade2-f981bc1d605e.
SigninLogs
| where TimeGenerated > ago(lookback)
| where tostring(AuthenticationProtocol) =~ "deviceCode"
| where AppId =~ "29d9ed98-a469-4536-ade2-f981bc1d605e"
| project TimeGenerated, UserPrincipalName, AppDisplayName, AppId,
IPAddress, Location, DeviceDetail, RiskLevelDuringSignIn,
ResultType, ConditionalAccessStatus, CorrelationId
4) Look for token use after the prompt. This is where the chain closes: non-interactive access to Graph, Exchange, SharePoint, Teams, or Azure resources after device-code success.
let dc =
SigninLogs
| where TimeGenerated > ago(lookback)
| where tostring(AuthenticationProtocol) =~ "deviceCode"
| where ResultType == 0 or tostring(Status) has "success"
| project UserPrincipalName, DcTime=TimeGenerated, CorrelationId;
AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(lookback)
| where UserPrincipalName in~ (dc | distinct UserPrincipalName)
| where ResourceDisplayName has_any ("Microsoft Graph","Exchange","SharePoint","Teams","Azure")
| join kind=inner dc on UserPrincipalName
| where TimeGenerated between (DcTime .. DcTime + 8h)
| project TimeGenerated, UserPrincipalName, DcTime, AppDisplayName,
ResourceDisplayName, IPAddress, Location, UserAgent,
CorrelationId, SessionId, ResultType
5) Check OAuth consent/app grants. Microsoft says the relevant Entra audit activities include Consent to application, Add delegated permission grant, and Add app role assignment to the service principal.
AuditLogs
| where TimeGenerated > ago(lookback)
| where Category =~ "ApplicationManagement"
| where ActivityDisplayName in~ (
"Consent to application",
"Add delegated permission grant",
"Add app role assignment to service principal",
"Add app role assignment to the service principal"
)
| project TimeGenerated, ActivityDisplayName, InitiatedBy, TargetResources,
Result, CorrelationId
6) Prioritize grants touching sensitive APIs. Microsoft flags permissions to Graph, Exchange, SharePoint, or Entra ID as high-risk.
AuditLogs
| where TimeGenerated > ago(lookback)
| where ActivityDisplayName has_any ("Consent to application","delegated permission grant","app role assignment")
| where tostring(TargetResources) has_any ("Microsoft Graph","Exchange","SharePoint","Azure Active Directory","Microsoft Entra")
| project TimeGenerated, ActivityDisplayName, InitiatedBy, TargetResources,
ModifiedProperties=TargetResources, Result, CorrelationId
7) Mailbox follow-on: rules, sends, item access. This is the BEC branch.
OfficeActivity
| where TimeGenerated > ago(lookback)
| where UserId in~ (users)
| where Workload =~ "Exchange"
| where Operation has_any ("New-InboxRule","Set-InboxRule","UpdateInboxRules",
"Send","SendAs","SendOnBehalf","MailItemsAccessed")
| project TimeGenerated, UserId, Operation, ClientIP, UserAgent,
OfficeObjectId, Parameters, ResultStatus
8) SharePoint/OneDrive follow-on: file access and download spike.
OfficeActivity
| where TimeGenerated > ago(lookback)
| where UserId in~ (users)
| where Workload in~ ("SharePoint","OneDrive")
| where Operation has_any ("FileAccessed","FileDownloaded","FileSyncDownloadedFull",
"SharingSet","AnonymousLinkCreated")
| summarize Count=count(), Objects=make_set(OfficeObjectId, 20)
by UserId, Operation, ClientIP, bin(TimeGenerated, 30m)
| where Count > 20 or Operation has_any ("AnonymousLinkCreated","SharingSet")
If checks 1–4 hit, assume token compromise and revoke sessions. If 5–6 hit, kill the app grant/service principal path too. If 7–8 hit, you’re no longer investigating “phishing attempts”; you’re in account-compromise response.
Alex has turned the earlier control discussion into something the shift lead can actually run: start by proving whether device-code redemption succeeded, then look for the handoff pattern that separates a mere phishing lure from an attacker-held token.
The important operational point is that the first pivot is not “who clicked a link,” but successful deviceCode authentication in sign-in telemetry, scoped to the suspected users and recent lookback window. From there, the stronger signal is correlation: join the interactive approval event with related non-interactive activity, especially where the approval browser and the later polling or token activity show different IPs, user agents, or locations. That mismatch is the practical hunting shape of device-code abuse.
Alex also kept the caveat visible: these are KQL-style checks, not guaranteed copy-paste queries for every tenant. Field names and table coverage vary by Sentinel connector, Entra ID licensing, and logging configuration. So the shift lead should treat the pack as a hunting pattern: confirm successful redemption, inspect token refresh or use, review suspicious OAuth consent or app grants, and then look for mailbox or Microsoft Graph follow-on activity.
What this gives us for synthesis is a clean response arc: prevention should lean toward blocking device-code flow where feasible; detection should not stop at the initial sign-in; and incident handling should assume the attacker may already have moved from user approval to durable token use or downstream mailbox/Graph access.
SOC decision: do not rely on “device-code flow only from managed/compliant devices” tonight. Marcus anchored the key point to Microsoft Conditional Access grant-control behavior: for OAuth device-code flow, the managed-device/device-state grant control is not supported, so that option is not a dependable EvilTokens containment. The recommended path is to block device-code flow by default tonight, with tightly named, temporary exceptions only for validated meeting-room devices and the two legacy CLI integrations, while hunting immediately for successful device-code redemption and follow-on M365 access.
Three unsolicited prompts are suspected active targeting, not proof of compromise. Compromise confidence rises only if Entra shows successful device-code authentication, non-interactive token use, OAuth consent changes, or mailbox/Graph/SharePoint/Teams activity.
The lower-disruption option is weaker than it sounds: “managed/compliant devices only” is not a reliable control for OAuth device-code flow because device-state grant enforcement is unsupported for that flow.
Tenant-wide block with named temporary exceptions is the best balance tonight: lower risk than leaving the flow open, less operational damage than disabling with no exceptions.
No regulatory notification is triggered by prompts alone. If redeemed tokens accessed personal data in mail, SharePoint, Teams, Graph, or files, preserve evidence and involve Legal/Privacy immediately.
Enforce Conditional Access: block OAuth device-code flow for all users/all cloud apps tonight; exclude only break-glass accounts and a time-boxed EXC-DeviceCode-Temporary group for validated room-device and CLI owners.
Hunt the last 24 hours for AuthenticationProtocol = deviceCode, successful sign-ins, interactive/non-interactive correlation mismatches, Microsoft Authentication Broker app ID 29d9ed98-a469-4536-ade2-f981bc1d605e, and post-auth access to Graph, Exchange, SharePoint, Teams, or Azure.
For the three reporting users: revoke sessions/refresh tokens, review MFA/device registrations, check OAuth consents and delegated grants, and inspect mailbox rules, sends, MailItemsAccessed, Teams, SharePoint, and Graph activity.
Notify Help Desk and executives: no one should enter unsolicited device codes or approve unexpected MFA/device prompts; all reports route directly to SOC.
Preserve Entra sign-in logs, non-interactive sign-in logs, AuditLogs, OfficeActivity, mailbox audit, conditional-access policy changes, exception approvals, and the incident decision rationale for Legal/Privacy review.