Open kellyMicrosoft opened 1 year ago
I'm having the same issue and found that if the dbatools module (version 2.0.4) is imported it causes this issue with Connect-AzAccount. If I run Connect-AzAccount before importing dbatools, then it connects successfully.
This probably means that some other module imported before Az.Accounts loads an earlier and incompatible version of assembly Azure.Core.dll. I've seen it happen with Microsoft.Graph.Authentication 2.0.0-rc3 - it contains Azure.Core 1.25, but recent Az.Accounts module versions need a newer Azure.Core (Az.Accounts 2.12.3 uses Azure.Core 1.31, if I'm not mistaken).
I can see that the dbatools module contains Azure.Core 1.25, same as Microsoft.Graph.Authentication 2.0.0-rc3. I don't see any other workaround than ensuring Az.Accounts is imported first and Connect-AzAccount is called before the other modules are imported.
Hello, any news here? I am currently struggling with same issue.
Using Az.Accounts 2.13.1 and Connect-AzAccount or Login-AzAccount is working fine for normal and ISE environment.
But I am trying to run PowerShell from an external tool (Adaxes) and there I always get entry point error ...
So... I might be way off base, mileage may vary, yada yada, I was getting this same error using a ServicePrincipal and after a while checked to see if the account was still connected using Get-AzContext
which it was and then disconnected with Disconnect-AzAccount
and miraculously it started working again so maybe you can't be logged in multiple times or there's some bug determining whether the account is already logged in, who knows.
Possibly related: https://github.com/Azure/azure-powershell/issues/21398
I get the 'entry point was not found' error under PS5.1 but not PS7.
I'm experiencing the same issue using -Identity
parameter.
Description
The Az.Accounts module updated to 2.12.3 last week and our service has been down since then. The error message is
System.EntryPointNotFoundException: Entry point was not found.
when we executeConnect-AzAccount
Issue script & Debug output
Environment data
Module versions
Error output