azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Login Authentication Failure on 2.63.0: Error code: -2147221164

Open mchen727 opened this issue 1 year ago • 3 comments

Describe the bug

When running az login -u $user -p $pass --tenant $tenant --allow-no-subscriptions we hit this error:

WARNING: Authentication with username and *** in the command line is strongly discouraged. Use one of the recommended authentication methods based on your requirements. For more details, see https://go.microsoft.com/fwlink/?linkid=2276314 ERROR: (pii). Status: Response_Status.Status_Unexpected, Error code: -2147221164, Tag: 557973639 Please explicitly log in with:

This is happening on CLI version 2.63.0 and not on 2.62.0

Related command

az login

Errors

WARNING: Authentication with username and *** in the command line is strongly discouraged. Use one of the recommended authentication methods based on your requirements. For more details, see https://go.microsoft.com/fwlink/?linkid=2276314 ERROR: (pii). Status: Response_Status.Status_Unexpected, Error code: -2147221164, Tag: 557973639 Please explicitly log in with:

Issue script & Debug output

N/A

Expected behavior

Should be able to login as normal

Environment Summary

{ "azure-cli": "2.63.0", "azure-cli-core": "2.63.0", "azure-cli-telemetry": "1.1.0", "extensions": {} }

Additional context

No response

mchen727 avatar Aug 07 '24 00:08 mchen727

Thank you for opening this issue, we will look into it.

yonzhan avatar Aug 07 '24 00:08 yonzhan

Also happened to me. Also had to rollback to 2.62.0

asrichesson avatar Aug 09 '24 06:08 asrichesson

Is there any interim solution for this apart from rollback to older version??

RajeshwarMs avatar Aug 25 '24 12:08 RajeshwarMs

Our team is also currently having this issue. Is there an ETA for a fix?

angaaruriakhil avatar Sep 05 '24 09:09 angaaruriakhil

Is there any interim solution for this apart from rollback to older version??

As a workaround, you may follow https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively#sign-in-with-web-account-manager-wam-on-windows to turn off WAM:

az account clear
az config set core.enable_broker_on_windows=false
az login

jiasli avatar Sep 05 '24 12:09 jiasli

We are still facing the issue in login process of az login and workaround doesn't seems to be working. FYI : login credentials is valid and works fine via azure portal. only problem with az cli

WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus WARNING: Authentication with username and password in the command line is strongly discouraged. Use one of the recommended authentication methods based on your requirements. For more details, see https://go.microsoft.com/fwlink/?linkid=2276314

ERROR: AADSTS50126: Error validating credentials due to invalid username or password. Timestamp: 2024-09-16 10:26:12Z Interactive authentication is needed. Please run: az login ERROR: Please run 'az login' to setup account.

mukeshinit avatar Sep 17 '24 08:09 mukeshinit

Hi @mchen727 , for the call related to WAM, could you help collect WAM logs described here: https://aka.ms/wamhot and we will be able to investigate further.

@mukeshinit , with the workaround, you disabled WAM and got the issue? Did you do the interactive authentication as instructed? Could you help collect the verbose logs?

Thank you very much.

xinyuxu1026 avatar Sep 23 '24 21:09 xinyuxu1026

Used the mentioned workaronud

mchen727 avatar Oct 08 '24 17:10 mchen727

I met the same error on 2.66.0

Kimmer01 avatar Nov 18 '24 02:11 Kimmer01

Any update on this issue ?we are still facing same error even with apply suggested workaround solution.

Authentication with username and password in the command line is strongly discouraged. Use one of the recommended authentication methods based on your requirements. For more details, see https://go.microsoft.com/fwlink/?linkid=2276314 (pii). Status: Response_Status.Status_InteractionRequired, Error code: 3399614467, Tag: 508609292

mukeshinit avatar Apr 30 '25 10:04 mukeshinit