[Microsoft internal] Microsoft tenant forbids device code flow
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Symptom
Recently, Microsoft tenant (`72f988bf-86f1-41af-91ab-2d7cd011db47`) started to forbid [device code flow](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-device-code).
To reproduce, run
```
az login --tenant 72f988bf-86f1-41af-91ab-2d7cd011db47 --use-device-code
```
Then open https://microsoft.com/devicelogin with a web browser, enter the device code and select the `@microsoft.com` account in the browser.
The login page shows error:
> **You don't have access to this**
> Your sign-in was successful but does not meet the criteria to access this resource. For example, you might be signing in from a browser, app, location, or an authentication flow that is restricted by your admin.
Troubleshooting details:
```
Error Code: 53003
Request Id: ...
Correlation Id: ...
Timestamp: 2025-11-13T08:20:29.147Z
App name: Microsoft Azure CLI
App id: 04b07795-8ddb-461a-bbee-02f9e1bf7b46
IP address: ...
Device identifier: ...
Device platform: Windows 10
Device state: Compliant
```
## Solution
Use a user account with WAM flow:
```sh
az login --tenant 72f988bf-86f1-41af-91ab-2d7cd011db47
```
## Additional information
IcM: 707266280, 710799821
Contributor guide
Assessment
This issue has not been assessed yet.