az login error: Failed to authenticate my guid 'Default Directory' due to error '(pii).

Timothy Fuller 50 Reputation points
2023-06-02T10:37:14.2833333+00:00

i get the following error trying to log with az cli. i do have a sub so what is going on any help would be great :

PS C:\Users\abc> az login

Please select the account you want to log in with.

Failed to authenticate my guid 'Default Directory' due to error '(pii). Status: Response_Status.Status_InteractionRequired, Error code: 3399614476, Tag: 557973645'

No subscriptions found for abc@gmail.com.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,041 questions
{count} votes

Accepted answer
  1. KarishmaTiwari-MSFT 20,212 Reputation points Microsoft Employee
    2023-06-07T20:20:26.3366667+00:00

    @Timothy Fuller

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: Customer was getting the following error when trying to log in to Azure with Azure CLI: Failed to authenticate my guid 'Default Directory' due to error '(pii). Status: Response_Status.Status_InteractionRequired, Error code: 3399614476, Tag: 557973645'

    Solution: Cx shared - "I needed to specify the tenantid, I just had to do it once and from then on it worked with the basic login command. Try this:

    az login --tenant <TenantID>
    

    If your issue remains unresolved or have further questions, please let us know in the comments how we can assist. We are here to help you and strive to make your experience better and greatly value your feedback.

    10 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Teresa Hanak 5 Reputation points
    2023-06-03T00:48:48.2433333+00:00

    I'm brand new to Azure and have had the same issue. I had followed the prompt on the landing page after downloading and installing Azure CLI today that included az clear for using an alternate login method that is being tracked. That created the issue and had me lost. I did resolve it but have not idea which of the following steps worked: 1) I removed all resources I had created while practicing as well as an app registration -- basically anything that I had made. 2) I uninstalled the CLI--first attempt no luck, but second I also removed all azure files on my system, including uninstalling Azure Data Studio just to make sure. 3) I made sure to sign out of my account in all places--portal and visual studio code. Probably overkill but after shutting down and reinstalling Azure CLI I got back to that landing page and was logged in using az login. I just ignored the prompt to use the alternative method and closed that page.


  2. Teresa Hanak 5 Reputation points
    2023-06-03T00:55:19.7633333+00:00

    This is the landing page I was referring to after az login. Going for the WAM was the wrong move for me as a beginner, so now just closing the page.

    You have logged into Microsoft Azure!

    You can close this window, or we will redirect you to the Azure CLI documentation in 1 minute.

    Announcements

    [Windows only] Azure CLI is collecting feedback on using the Web Account Manager (WAM) broker for the login experience.

    You may opt-in to use WAM by running the following commands:

    az config set core.allow_broker=true
    az account clear
    az login


  3. Data Science 0 Reputation points
    2024-07-11T18:40:17.5533333+00:00

    After the above steps, still the same error.

    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.