Describe the bug
I was expecting an error when I tried to do these steps:
- use azure cli v2.52
- run
az login --service-principal --username <usrname> --password <pwd> --tenant <tenantname>
- run the above command again but with a wrong password
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 show command. After run this command:
az account clear
And 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
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