Closed J0F3 closed 3 years ago
Thanks @J0F3 for reporting this. @VeryEarly, @erich-wang we might want to consider the default behavior in the container with Az.Accounts 2.0 - Also seems related to #13029
Thanks for reporting. We'll fix this in the stable release of Az.Accounts. Closing the issue as duplicate of #13029
Description
Connect-AzAccount
of the 2.0.1-preview version of the Az.Account Module (which is need in some scenarios to be able to login with Az PowerShell at all) tries to open a browser even when running in docker container and the output says "Reverting to device code login".The use of Device Authentication must be enforced with
Connect-AzAccount -UseDeviceAuthentication
otherwiseConnect-AzAccount
hangs indefinitely.Steps to reproduce
docker run -it --rm mcr.microsoft.com/azure-powershell
Install Az.Account Preview Module
Login to Azure
Environment data
Docker Image used:
Module versions
Debug output
Error output