# Device code phishing: a briefing for managers after Microsoft's lab test

> On 17 November 2026 Microsoft showed in a lab that one approved device code can hand an attacker an AI coding assistant. What it is, and what to tell staff.

- URL: https://iamops.dev/device-code-phishing-briefing-for-managers/
- Language: en
- Author: Argo
- Published: 2026-11-17
- Category: News
- Topics: Phishing, Device code, AI agents, Security

## TL;DR

- On 17 November 2026, Microsoft published a lab analysis of device code phishing against AI coding assistants. The page the person sees is genuine; the request is the attacker's.
- In the lab, one approved GitHub device-code request let researchers steer a session, write misleading memory, read cloud session history, or reach private repositories, depending on settings.
- Microsoft says those four outcomes are a proof of concept and have not been seen in the wild. Device code phishing itself is a recurring route to account takeover.
- Enter a device code only for a sign-in you started yourself. Review connected applications and tighten what the assistant can reach.

Device code sign-in is the flow where a device without a convenient keyboard shows a short code, and you enter that code on another device to approve the sign-in. Smart TVs use it. So do many command-line tools.

On 17 November 2026, Microsoft's security researchers published an analysis of how the same flow can be turned against AI coding assistants. I already wrote a [longer post](https://iamops.dev/device-code-phishing-ai-agents/) on the technical detail. This is the shorter briefing I would give a manager.

## What the attack actually is

In device code phishing, the attacker starts the sign-in on their own machine and receives a short code. They send that code to someone else, often dressed up as an IT request or a licence check. The person opens the genuine sign-in page, enters the code and approves. That signs the attacker in.

The page is real. That is why the trick works. Microsoft's point is that a legitimate site does not tell you who started the request. GitHub's own verification page, Microsoft notes, warns people never to use a code sent by someone else.

![Three steps in a row: someone sends you a short code, you enter it on a real sign-in page, and the person who started the request is signed in. Approve a code only if you started the sign-in yourself.](https://iamops.dev/img/device-code-phishing-briefing-for-managers.svg)

*What the person actually does. The only step they take is entering a short code on a real sign-in page. The request behind that code was started by someone else.*

## What Microsoft showed in the lab

The team used GitHub Copilot's command-line tool as an example. The technique is not limited to that tool: any public client that supports this sign-in flow can be abused the same way, and the attacker chooses which permissions to request. A public client is an app that cannot keep a secret, such as a command-line tool or a television.

In a controlled lab test, a test account approved a GitHub device-code request that the researchers had started. With that one approval, they could, depending on the account's settings:

- steer an active session of the assistant remotely and have it run commands on the person's machine,
- add misleading entries to the assistant's memory,
- read session history stored in the cloud,
- reach private code repositories visible to the account.

Microsoft states that these are proof-of-concept results, and that it has not seen those four outcomes in real attacks. Device code phishing itself is older. Microsoft calls it a recurring route to account takeover, and names earlier campaigns, including one called EvilTokens that it helped disrupt in September 2026.

## What I would tell a team

Enter a device code only for a sign-in you started yourself, on a screen you opened. A code that arrives in a message from someone else is a warning, even when the page is genuine.

Review the applications connected to work accounts and remove ones nobody recognises. Microsoft points to GitHub's settings for authorised OAuth apps as an example. OAuth apps are the applications a person has allowed to use an account.

For AI coding tools, use the tightest settings you can live with for remote control, cloud session storage and memory. An approval is only as valuable as what the assistant can reach.

Microsoft also describes detections in Microsoft Defender for phishing of this kind delivered by email or Teams, and a way to suspend a managed GitHub identity. Those are for security teams. The habit I would ask everyone to keep is the first one: if you did not start the sign-in, do not enter the code.

The [longer post](https://iamops.dev/device-code-phishing-ai-agents/) has the step-by-step of the flow and the same source.

## Sources

- [Microsoft Security Blog, 17 Nov 2026: The risks of device code authentication for AI coding agents](https://www.microsoft.com/en-us/security/blog/2026/11/17/the-risks-of-device-code-authentication-for-ai-coding-agents/)
