azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Unable to do az login from terminal use company SSO

Open zhangjingcat opened this issue 9 months ago • 6 comments

Describe the bug

Hello Azure,

I was trying to use az login from macOS terminal but faced below errors.

Both chrome, edge failed in private and public windows.

Error Code: 53003 Request Id: 074bf675-a18e-4f2e-aeef-4923f6132400 Correlation Id: b6cc601a-82f1-4d41-9c20-9e19db29d4dd Timestamp: 2026-02-12T01:02:40.125Z App name: Microsoft Azure CLI App id: 04b07795-8ddb-461a-bbee-02f9e1bf7b46 IP address: 2409:8a1e:8f22:6d80:a899:92d7:3297:d3ff Device identifier: 9c195094-2a9c-4108-8580-e0fa16f2c1ff Device platform: macOS Device state: Compliant

Image Image

Related command

az login

Errors

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, or location that is restricted by your admin.

Issue script & Debug output

Error Code: 53003 Request Id: 074bf675-a18e-4f2e-aeef-4923f6132400 Correlation Id: b6cc601a-82f1-4d41-9c20-9e19db29d4dd Timestamp: 2026-02-12T01:02:40.125Z App name: Microsoft Azure CLI App id: 04b07795-8ddb-461a-bbee-02f9e1bf7b46 IP address: 2409:8a1e:8f22:6d80:a899:92d7:3297:d3ff Device identifier: 9c195094-2a9c-4108-8580-e0fa16f2c1ff Device platform: macOS Device state: Compliant

Image Image

Expected behavior

I should be able to login and create my personal access token,

Environment Summary

az --version azure-cli 2.83.0

core 2.83.0 telemetry 1.1.0

Dependencies: msal 1.35.0b1 azure-mgmt-resource 23.3.0

Python location '/opt/homebrew/Cellar/azure-cli/2.83.0/libexec/bin/python' Config directory '/Users/I545542/.azure' Extensions directory '/Users/I545542/.azure/cliextensions'

Python (Darwin) 3.13.12 (main, Feb 3 2026, 17:53:27) [Clang 17.0.0 (clang-1700.6.3.2)]

Legal docs and information: aka.ms/AzureCliLegal

Unable to check if your CLI is up-to-date. Check your internet connection.

Additional context

No response

zhangjingcat avatar Feb 12 '26 01:02 zhangjingcat

Thank you for opening this issue, we will look into it.

yonzhan avatar Feb 12 '26 01:02 yonzhan

Here are some similar issues that might help you. Please check if they can solve your problem.

  • #30632
  • #28062

Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

This workaround works for me: https://github.com/Azure/azure-cli/issues/27879#issuecomment-1835743397

Reference:

  • https://github.com/azure/azure-cli/issues/28062#issuecomment-2143225221

Powered by issue-sentinel

github-actions[bot] avatar Feb 12 '26 01:02 github-actions[bot]

Here are some similar issues that might help you. Please check if they can solve your problem.

Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

This workaround works for me: #27879 (comment)

Reference:

Powered by issue-sentinel

Thanks Robot, I checked some of them and the proposed solution, my case is different, I can be redirected to the browser by the link automatically, it's just after putting my email and password (company sso) then I got the login success but resource access failure, so not sure there were some higher level permission control so I pasted the complete error message above. Thanks.

zhangjingcat avatar Feb 12 '26 01:02 zhangjingcat

I can be redirected to the browser by the link automatically

This indicates you are using auth code flow (also known as browser flow).

For now, for ARM (https://management.core.windows.net//.default), we are only aware that Microsoft tenant blocks device code flow (https://github.com/Azure/azure-cli/issues/32420). The broker is not enforced for ARM yet.

The broker is only enforced for Microsoft Graph (https://graph.microsoft.com//.default) (https://github.com/Azure/azure-cli/issues/31030).

Could you share the full az login command you used to log in?

Also, are you a Microsoft employee? If not, you need to contact your tenant administrator to check why you are blocked, possibly by IP restriction, VPN requirement, etc.

jiasli avatar Feb 13 '26 07:02 jiasli

Hello @jiasli ,

I used both "az login" and "az login --use-device-code" but both not work.

I am not a Microsoft employee, and I was using Big IP Edge Client VPN to access the resource, I will try to find our tenant administrator first.

zhangjingcat avatar Feb 13 '26 07:02 zhangjingcat

Using WSL or Linux terminal, the following worked for me, using Edge:

sudo ln -s '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe' /usr/local/bin/www-browser

export BROWSER="/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"

welersonlisboa1970 avatar Apr 10 '26 09:04 welersonlisboa1970