Open Atavuli opened 3 years ago
Thanks for reporting. We have fixed couple issue in Az.Accounts for authentication. Please try the latest version of Az.Accounts 2.2.8 and try Connect-AzAccount again after restart powershell.
Thanks for reporting. We have fixed couple issue in Az.Accounts for authentication. Please try the latest version of Az.Accounts 2.2.8 and try Connect-AzAccount again after restart powershell.
After installing version 2.2.8 of Az.Accounts module and restarting powershell, the following was the result (no change)
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
WARNING: INITIALIZATION: Token cache encryption is not supported in current environment and token cache will be fallen
back as plain text.
Loading personal and system profiles took 4890ms.
PS C:\WINDOWS\system32> connect-azaccount
WARNING: Unable to acquire token for tenant 'organizations' with error 'InteractiveBrowserCredential authentication
failed: Persistence check failed. Inspect inner exception for details'
WARNING: Please run 'Connect-AzAccount -DeviceCode' if browser is not supported in this session.
connect-azaccount : InteractiveBrowserCredential authentication failed: Persistence check failed. Inspect inner
exception for details
At line:1 char:1
+ connect-azaccount
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
PS C:\WINDOWS\system32> get-module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.2.8 Az.Accounts {Add-AzEnvironment, Clear-AzContext, Clear-AzDefault, Conn...
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest 3.0.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, En...
Script 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...
The issue is still persisting...
Issue is still present, any assistance would be appreciated
It seems your environment has special setting. Please reference #13691 . The similar issue is not resolved yet. I have created an issue to MSAL https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/2594.
Please watch it and add additional information if required.
@atavuli - are you using a regular (non-virtual) Win10 machine? Does this happen if you start in non-admin mode? Does this happen on some machines but not others?
I have a similar issue with Powershell 5.1, Az module version 2.28, on windows 10 whether running as either administrator or user.
The only way I've managed to get it to work is by using Powershell ISE. From ISE a login screen pops up when the command is executed and I can authenticate without issue. From the standard Powershell console (same version, 5.1) I get:
❯ Connect-AzAccount -TenantId $tenant
WARNING: Please run 'Connect-AzAccount -DeviceCode' if browser is not supported in this session.
Connect-AzAccount : InteractiveBrowserCredential authentication failed: Persistence check failed. Inspect inner exception for
details
At line:1 char:1
+ Connect-AzAccount -TenantId $tenant
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
The -DeviceCode
or -UseDeviceAuthentication
flags don't work either. Only ISE has worked, and it took me a long time to figure that one out. This started happening a couple of weeks ago, and was working fine prior to that.
I am still facing this issue, tried all the suggestions given on every portal, nothing helps. If anybody fixed this, please advise.
I was able to connect using the "Windows PowerShell ISE" interface...don't know what is the difference in the authentication process
Description
Unable to connect to Azure from Powershell using Connect-AzAccount. Windows 10
Steps to reproduce
Opening Powershell in Administrator Mode:
Environment data
Module versions
Debug output
Error output