-
Notifications
You must be signed in to change notification settings - Fork 3.5k
az login still logged in successfully with wrong password in v2.5 #27441
Copy link
Copy link
Closed
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAccountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAccountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
I was expecting an error when I tried to do these steps:
az login --service-principal --username <usrname> --password <pwd> --tenant <tenantname>Expected: cannot log in
Actual: still be able to login with the wrong password
After finding around, i found out that in v2.52, it saves your logged in account in this
az account showcommand. After run this command:az account clearAnd then run the login command with the wrong password, then it would meet my expectation. (I used to use az cli v2.3 and this never happened back then)
My main question is: is this considered a bug? And what other option for login do I have to use to make it fail at the second time logging in?
Related command
Az login, az account
Errors
Az login still be able to login with wrong password
Issue script & Debug output
NA
Expected behavior
Cannot login at 2nd attemp
Environment Summary
Azure cli 2.52
Additional context
No response