az login opens microsoft login which leads to azure login

Masoud Modabber 0 Reputation points
2025-01-08T06:11:02.44+00:00

I am using az login in powershell to login to my account. it opens a dialog box for me to enter my user pass which is successful. But then it opens another azure login dialog box that asks for my username password. and when I enter the same username it says we couldn't find an account with that username!

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Abiola Akinbade 29,645 Reputation points Volunteer Moderator
    2025-01-08T07:38:32.89+00:00

    Hello Masoud Modabber,

    Thanks for your question.

    This can be due to multiple account caching. Try to clear residual creds. Try this using az account clear.

    You can alternatively try using device code authentication az login --use-device-code

    See: https://learn.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az-account-clear

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    1 person found this answer helpful.
    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.