What’s device code authentication and why are we restricting it?

by | Jul 31, 2026 | IT News & Insights New Zealand | Cybersecurity, AI & Microsoft Updates

What’s Device Code Authentication?

Most people have used Device Code Authentication without realising it: A common example is setting up a Teams Room in a meeting room.
The device displays a message similar to:
Go to microsoft.com/devicelogin and enter code XYZ123
You grab your laptop or phone, go to the website, sign in with your Microsoft 365 account, approve MFA, and the room system is ready to go.  I’ve also seen exactly the same process at home when signing into streaming services on a smart TV.
Device Code400
It’s simple, convenient, and for a long time it was considered a safe way for devices with limited keyboards or browsers to authenticate.  The problem is that attackers have worked out how to abuse it.

What’s Changed?

Over the last couple of years, Device Code Authentication has become a popular method for cybercriminals trying to gain access to Microsoft 365 environments.  Unlike traditional phishing attacks where criminals try to steal usernames and passwords, Device Code attacks rely on tricking a user into entering a valid code and approving the sign-in themselves.
The login page is legitimate.  The MFA prompt is legitimate.  The user is genuinely signing into Microsoft. 
They’re just unknowingly authorising a session that was initiated by an attacker.  That makes these attacks particularly effective because they can bypass the protections many organisations rely on, including Multi-Factor Authentication.

 Why Are We Restricting It for KARE clients?

The reality is that very few people use Device Code Authentication as part of their day-to-day work.  For most organisations, the business value is low while the security risk is increasing.
Microsoft now recognises Device Code Flow as a higher-risk authentication method and recommends blocking it wherever it isn’t required. Restricting it helps to:
  • Reduce an increasingly common attack path.
  • Prevent users from accidentally authorising attacker-controlled sessions.
  • Strengthen Microsoft 365 security even when MFA is enabled.
  • Follow Microsoft’s current security recommendations.
  • Remove unnecessary risk from the environment.

 Will Anything Stop Working?

Possibly.  Some meeting room systems, shared devices, specialised applications, and legacy platforms still rely on Device Code Authentication.  That’s why we’re restricting it rather than blindly blocking it everywhere.  Where there’s a genuine business requirement, we’ll review it and make exceptions where appropriate.

The Bigger Picture

Good cybersecurity isn’t about adding security for the sake of it.  It’s about reducing unnecessary risk while keeping people productive.  For most organisations, Device Code Authentication has become one of those areas where the risk now outweighs the benefit.  This is simply another step towards a more secure Microsoft 365 environment and a proactive approach to protecting your business, and that’s the point of the proactive KARE Foundation Cybersecurity service. That is far better than waiting until there’s an incident and reacting afterwards.