Unable to connect to my account in Azure from Azure cli.

Femi A 15 Reputation points
2023-06-22T17:52:14.4466667+00:00

PS C:\Users\femia> az login

Please select the account you want to log in with.

Failed to authenticate bbcfc176-9067-42c4-baac-90fe62adaa58 'Default Directory' due to error '(pii). Status: Response_Status.Status_InteractionRequired, Error code: 3399614476, Tag: 557973645'

No subscriptions found for ******@hotmail.com.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,703 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,177 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 44,516 Reputation points
    2023-06-23T14:48:06.4933333+00:00

    Hello Femi,

    Thank you for your question and for reaching out with your question today.

    The error message you encountered while trying to log in to Azure using Azure CLI suggests that there is an authentication issue with the specified account. The error code and message indicate that some form of user interaction is required to complete the authentication process. This could be due to factors such as multi-factor authentication (MFA) requirements or consent prompts.

    To resolve this issue, you can try the following steps:

    1. Check MFA Requirements: If your account has multi-factor authentication enabled, make sure you have access to the required MFA method (e.g., phone, authenticator app) and complete the authentication process accordingly. This may involve providing additional verification factors during the login process.
    2. Clear Azure CLI Cache: Sometimes, cached credentials can cause authentication issues. You can try clearing the Azure CLI cache by deleting the ~/.azure directory or the %APPDATA%\Azure directory if you're on Windows. After clearing the cache, attempt the login process again.
    3. Use Azure CLI Interactive Login: Instead of using the non-interactive login (az login), you can try the interactive login method by running az login --tenant <directory_or_tenant_id>. This command will prompt you to sign in interactively, allowing you to provide any necessary consent or MFA verification during the login process.
    4. Verify Account and Subscriptions: Ensure that the account you are trying to log in with is a valid account in the Azure AD tenant and that it has the necessary permissions and subscriptions associated with it. You can check this information by logging into the Azure portal using the same account and verifying the account details and subscriptions.
    5. Check Network and Firewall Settings: In some cases, network or firewall restrictions can prevent successful authentication. Ensure that you have a stable internet connection and that any firewall or proxy settings are properly configured to allow the necessary communication with Azure services.

    If the issue persists after trying these steps, it may be helpful to provide more information about your environment, such as the version of Azure CLI you are using and any specific configurations you have in place. Additionally, consider reaching out to Azure support for further assistance, as they can help troubleshoot and diagnose the specific issue with your account authentication.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    If the reply was helpful, please don’t forget to upvote or accept as answer.

    4 people found this answer helpful.

  2. Padmanaban, Poobalan 20 Reputation points
    2025-02-11T18:17:35.37+00:00

    Hi Team ,

    We have Azurecli access before and we able to deploy changes via cli . From today we are not able to use Azurecli via azure portal and we able to see blank screen as attached . Could you please check and let me know is there any global issue to access azurecli currently happening or any access restriction ?

    Please let us know any other way we can access azurecli externally ?

    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.