A cloud-based identity and access management service for securing user authentication and resource access
This failure is consistent with a Microsoft Entra Conditional Access requirement, specifically MFA enforcement through Security Defaults or another access policy.
Use this path:
- Stop using username/password sign-in for Azure CLI.
az login --user <username> --password <password>and ROPC-style password sign-in do not work when MFA is required. - Sign in interactively instead.
Run:
If the browser flow does not complete correctly, force device code flow:az logout az loginaz login --use-device-code - If the account belongs to multiple tenants, specify the correct tenant explicitly.
Azure CLI can try the first tenant it finds, which can cause authentication failure against the wrong tenant.az login --tenant 00000000-0000-0000-0000-000000000000 - If the failure is still tied to Conditional Access or Security Defaults, the sign-in policy must be satisfied at sign-in.
Documented resolution options are:- have the Azure administrator enforce MFA at sign-in so the session satisfies Conditional Access requirements
- if MFA enforcement at sign-in is not possible, authenticate interactively with a claims challenge:
az logout az login --tenant "aaaabbbb-0000-cccc-1111-dddd2222eeee" --scope "https://management.core.windows.net//.default" --claims-challenge "<claims-challenge-token>" - For automation or scripts, switch to a workload identity instead of a user identity.
When MFA is required, the supported approach is to use a service principal or managed identity. - Since the sign-in report already shows failure under Security Defaults, check with the Conditional Access or tenant administrator to review that policy.
Similar Azure CLI failures with messages like “you don't have access to this” and error 53003 are resolved by correcting Conditional Access restrictions.
If the account is the only admin and access is blocked by MFA or policy, recovery may require another admin account or tenant access recovery steps before Azure portal and CLI access can be restored.
References:
- Troubleshooting Azure CLI
- Sign into Azure interactively using the Azure CLI
- The impact of multifactor authentication on Azure CLI in automation scenarios
- Require MFA for Azure management
- Prepare your environment for the Azure CLI
- Unable to perform az login. - Microsoft Q&A
- Az login fails from my device - Microsoft Q&A
- Cannot log into Azure due to MFA - Microsoft Q&A