A page gave me a code to enter on Microsoft's site. Is it a scam?
Almost always, yes. A device code is meant for a television, a printer or a tool on your own screen. When a web page, an e-mail or a caller gives you a code and asks you to type it at microsoft.com/devicelogin (or a Google, GitHub, AWS or Okta device page), signing in hands your account to whoever made the code, even with two-step sign-in.
The short answer
Type a device code only for a device you are holding that shows it. The sign-in page is real, which is why this works: your password, the code on your phone and even a passkey are all accepted, and the session goes to the attacker's "device". If you already did it, act now: steps below.
What you probably saw
- A "document waiting for your review", a voicemail, a payment or a shared file, with a button that copies a short code and opens the Microsoft sign-in page.
- A message from "IT support" or a colleague asking you to "confirm your account" with a code.
- A page that says "paste the code to open the document".
You typed the code and signed in: what to do now
- At work: tell your IT team at once. They can end every session of your account and revoke its refresh tokens; a password change alone does not end the attacker's session.
- Personal account: on account.microsoft.com (or your Google, GitHub or Okta account), sign out of every session, change the password and review the recent sign-ins and the apps with access.
- Check your mailbox for new forwarding rules and sent messages you did not write.
You typed the code but did not finish signing in
Close the page. Without the sign-in, the code expires after a few minutes and gives nobody access.
How ByteMantle helps
With phishing and Device Code protection (Pro plan and up), ByteMantle recognises a page that puts a short code on your clipboard and then opens a device sign-in page of Microsoft, Google, GitHub, AWS or Okta: the sign-in page is not opened and you are told why. When a lure sent you to the device sign-in page another way, the warning appears on that page before you type. If you started the sign-in yourself, for a real device, you can continue once.
What this does not cover
A code read to you over the phone and typed on another device is outside the browser. The protection is part of the paid plans; the free extension does not include it.
Questions and answers
Is microsoft.com/devicelogin a scam site?
No, it is Microsoft's real page. The scam is someone else's code: whoever created the code gets the session when you sign in.
Does two-step sign-in protect me?
No. You sign in on the real page, so every factor is accepted; the attacker receives the session afterwards.
Does it work with Google or GitHub too?
Yes, the same trick exists for Google, GitHub, AWS, Okta and others that have a device sign-in page.
Does ByteMantle stop it?
Yes, with Device Code protection (Pro and up): the page that gives you the code cannot open the sign-in page, and a lure that sent you there is warned on the sign-in page.
How do companies block this?
Microsoft 365 administrators can block device code sign-in with Conditional Access where it is not needed. Our guide for IT teams: device code phishing in Microsoft 365.
Read more
Stop these attacks before anything runs.
Free browser protection for everyone, in Chrome and Edge. One console for your whole company when you need it.