Repository navigation
Authentication failed with az login #34169
Description
Activity
- addedbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
on Oct 5, 2026 - addedAuto-AssignAuto assign by botAuto assign by botAccountaz login/accountaz login/accountAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
on Oct 5, 2026 x-engineering-agent commented
on Oct 5, 2026 ContributorMore actionsYanan 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)
- addedagent-assist-needs-infoWaiting for information requested by agent-assistWaiting for information requested by agent-assist
on Oct 5, 2026 microsoft-github-policy-service commented
on Oct 5, 2026 ContributorMore actions🔔 Routing this issue to @Azure/act-identity-squad.
- removedquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
on Oct 6, 2026 az login
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
- addedneeds-author-feedbackMore information is needed from author to address the issue.More information is needed from author to address the issue.
on Oct 8, 2026 microsoft-github-policy-service commented
on Oct 8, 2026 ContributorMore actions🔔 Routing this issue to @Azure/act-identity-squad.
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