Connect-AzureRmAccount remembers password, even with Autosave disabled.
Description
When logging on to Azure RM with PowerShell I do not get prompted for a password, somehow the sign in process from PowerShell remembers the password I have issued. This is quite scary.
Tried to uninstall all Azure related PowerShell modules. Had to enter the password the first time. It still keeps remembereing. Even after Disable-AzureRmContextAutosave and resetting all browser caches.
None of my browsers "remembers" my password like this.
Script/Steps for Reproduction
Connect-AzureRmAccount
Module Version
6.4.0 (Has been so for a couple of weeks, so at least it was the same with 6.3.x).
Environment Data
Name Value
---- -----
PSVersion 5.1.17134.165
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.165
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1```
@KarlGW Hey Karl, just to clarify, when you say
When logging on to Azure RM with PowerShell I do not get prompted for a password, somehow the sign in process from PowerShell remembers the password I have issued.
are you referring to the UI box that pops up when running Connect-AzureRmAccount (and the password is already entered after providing a username), or are you referring to the fact that you can run cmdlets without having to run Connect-AzureRmAccount?
@cormacpayne It's in the UI box. It just takes the user name, and then continues without password prompt. This might not be an issue with PowerShell, but since all my browsers ask for a password when using the same account, but the UI box from the cmdlet does not, I figured it might be something with the inner workings of the modules.
@KarlGW The dialog is just a window that opens the IE browser on the azure login web app. The behavior on a domain-joined machine is dependent on the IE settings and the setting in the domain (for example, in some domains, if you are logged onto your machine as user A, you cannot log in as UserB).
If you are logging in using organizational credentials on a machien where you are already logged into the machine as the same user, I believe this is by design. If you are logging in using MSA credentials, or using an organizational ID other than the logged in ID, then you may need to delete the IE browsing history (IE, not edge) and cookies. If this doesn't work, please let us know.
Closing due to inactivity.