Repository navigation
Authentication failed with az login #34169
Description
Describe the bug
Authentication failed
invalid_client: AADSTS50012: Authentication failed. Trace ID: 3ddd87b8-ac90-4a2d-847b-ef56db543b00 Correlation ID: baf678a2-4691-43b2-8aae-fdb77382ef1f Timestamp: 2026-10-05 20:03:00Z. (https://login.microsoftonline.com/error?code=50012)
You can log an issue at Azure CLI GitHub Repository and we will assist you in resolving it.
Related command
az login then choose githubazure.com account
Errors
Authentication failed
invalid_client: AADSTS50012: Authentication failed. Trace ID: 3ddd87b8-ac90-4a2d-847b-ef56db543b00 Correlation ID: baf678a2-4691-43b2-8aae-fdb77382ef1f Timestamp: 2026-10-05 20:03:00Z. (https://login.microsoftonline.com/error?code=50012)
Issue script & Debug output
Authentication failed
invalid_client: AADSTS50012: Authentication failed. Trace ID: 3ddd87b8-ac90-4a2d-847b-ef56db543b00 Correlation ID: baf678a2-4691-43b2-8aae-fdb77382ef1f Timestamp: 2026-10-05 20:03:00Z. (https://login.microsoftonline.com/error?code=50012)
Expected behavior
it worked last week
Environment Summary
az --version
azure-cli 2.87.0 *
core 2.87.0 *
telemetry 1.1.0
Extensions:
account 0.2.5
kusto 0.5.0
resource-graph 2.1.1
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Additional context
No response
Activity
x-engineering-agent commentedon Oct 5, 2026
Yanan Cai (@yanancai), the command,
AADSTS50012error, and CLI/MSAL versions are already clear. Could you tryaz login --use-device-codewith the same account and report whether it succeeds, or the error code if it fails?Azure CLI 2.87.0 uses separate interactive and device-code sign-in paths. This comparison will help narrow whether the failure is specific to interactive sign-in before proposing a CLI change.
Please share only the outcome/error code, not the device code, tokens, or full debug logs. I will revisit the issue when you reply.
Posted by x-engineering-agent (Fixer)
microsoft-github-policy-service commentedon Oct 5, 2026
🔔 Routing this issue to @Azure/act-identity-squad.
yonzhan commentedon Oct 6, 2026
az login
isra-fel commentedon Oct 8, 2026
AADSTS50012 means something's wrong with the certificate. Please ensure you are using the correct certificate for authentication.
https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes
microsoft-github-policy-service commentedon Oct 8, 2026
🔔 Routing this issue to @Azure/act-identity-squad.
microsoft-github-policy-service commentedon Oct 15, 2026
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!