Azure CLI set up

Zweli Khumalo 20 Reputation points
2025-07-29T22:15:48.2933333+00:00

Ive been trying to set azure cli on my machine for some time now, and have had no luck

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
{count} votes

1 answer

Sort by: Most helpful
  1. Ravada Shivaprasad 920 Reputation points Microsoft External Staff Moderator
    2025-07-29T23:38:49.5866667+00:00

    Hi Zweli Khumalo

    The error you're encountering (AADSTS50076) indicates that your Azure AD administrator has enabled security defaults or conditional access policies requiring multi-factor authentication (MFA) for your tenant. This is a security feature that Microsoft implements to protect access to Azure resources, particularly when administrators make configuration changes or when accessing from new locations.

    If you're an administrator, you can resolve this by reviewing your tenant's security policies. First, check if security defaults are enabled in Azure AD tenant properties. Then review any conditional access policies that might be enforcing MFA and verify if there are any location-based access restrictions. If needed, you can modify these policies or revoke MFA sessions for affected users through the Azure Portal, after which users will need to re-register their MFA method.

    If you're a regular user, you'll need to contact your administrator and share the error message along with the correlation ID (38198423-980e-4638-b64c-a76b27063dec). Request that they verify your MFA configuration and check for any recent security policy changes. While waiting for their response, you can try accessing your tenant specifically using the command az login --tenant d0e8b21d-9a9-4416-a188-3476f4a38a42.

    It's important to note that this error can occur even if MFA appears disabled in your account settings, and it may affect only specific tenants while others work normally. If you're accessing from a new location, this could trigger additional security requirements.

    Hope it helps!

    Thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.