-
Notifications
You must be signed in to change notification settings - Fork 4k
Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found: #20526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mark3grahams , thanks for reporting. Normally, this random "Method not found" error is due to unexpected assembly was imported into PowerShell console due to other modules. When you hit the issue again, please execute below script and check where
|
Will do. It will likely be a few days or so. |
FullName Location Microsoft.Identity.Client, Version=4.29.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\MicrosoftTeams\4.7.0\net472\Microsoft.Identity.Client.dll Microsoft.Identity.Client, Version=4.36.1.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\PnP.PowerShell\1.12.0\Framework\Microsoft.Identity.Client.dll Microsoft.Identity.Client, Version=4.37.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Microsoft.Identity.Client.4.37.0\net45\Microsoft.Identity.Client.dll Microsoft.Identity.Client, Version=4.46.2.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\Az.Accounts\2.10.4\PreloadAssemblies\Microsoft.Identity.Client.dll Microsoft.Identity.Client.Desktop, Version=4.37.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Microsoft.Identity.Client.Desktop.4.37.0\net461\Microsoft.Identity.Client.Desktop.dll Microsoft.Identity.Client.Extensions.Msal, Version=2.18.4.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\PnP.PowerShell\1.12.0\Framework\Microsoft.Identity.Client.Extensions.Msal.dll Microsoft.Identity.Client.Extensions.Msal, Version=2.23.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\Az.Accounts\2.10.4\PreloadAssemblies\Microsoft.Identity.Client.Extensions.Msal.dll Microsoft.IdentityModel.Abstractions, Version=6.22.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 \Documents\WindowsPowerShell\Modules\Az.Accounts\2.10.4\PreloadAssemblies\Microsoft.IdentityModel.Abstractions.dll Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.7.16602, Culture=neutral, PublicKeyToken=31bf3856ad364e35 \Documents\WindowsPowerShell\Modules\AzureADPreview\2.0.2.149\Microsoft.IdentityModel.Clients.ActiveDirectory.dll |
@mark3grahams , please |
Is this a bug or something I am doing wrong? |
No. it is a limitation of .NET and PowerShell so far. If one assembly is loaded into .NET runtime, it may interfere others which are depending on the same assembly but different version.
|
Hi @mark3grahams. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “ |
/unresolve. I've done that and it did not seem to help. #Requires -Module ActiveDirectory,Az.Accounts,ImportExcel |
FullName Location Microsoft.Identity.Client, Version=4.36.1.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\PnP.PowerShell\1.12.0\Framework\Microsoft.Identity.Client.dll Microsoft.Identity.Client, Version=4.46.2.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\Az.Accounts\2.10.4\PreloadAssemblies\Microsoft.Identity.Client.dll Microsoft.Identity.Client.Extensions.Msal, Version=2.18.4.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\PnP.PowerShell\1.12.0\Framework\Microsoft.Identity.Client.Extensions.Msal.dll Microsoft.Identity.Client.Extensions.Msal, Version=2.23.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae \Documents\WindowsPowerShell\Modules\Az.Accounts\2.10.4\PreloadAssemblies\Microsoft.Identity.Client.Extensions.Msal.dll Microsoft.IdentityModel.Abstractions, Version=6.22.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 \Documents\WindowsPowerShell\Modules\Az.Accounts\2.10.4\PreloadAssemblies\Microsoft.IdentityModel.Abstractions.dll |
@mark3grahams , what's the result if you only import Az.Accounts and execute |
The error has been hit or miss, but I’ll give this a try a few times today and report back. |
Import-Module Az.Accounts connect-azAccount That seemed fine as it logged on with my user and not the certificate. |
Do you have any other suggestions? |
/unresolve |
This is not resolved. |
Still not resolved. |
This module seems to be incompatible with dbatools. |
Correction: Importing |
The
|
Yeah, seems like a common issue—all kind of the same problem, no cross-testing |
Description
Seemingly randomly, I receive the following error when I log on as a service principal using a certificate. Restarting the terminal in VSCode sometimes resolves it. Sometimes it does not.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: