Repository navigation
Import-Module Microsoft.Graph.Authentication 2.34.0 Error GetTokenAsync #3479
Description
Activity
- addedstatus:waiting-for-triageAn issue that is yet to be reviewed or assignedAn issue that is yet to be reviewed or assignedtype:bugA broken experienceA broken experience
on Dec 21, 2025 Thanks for reporting this Andres Bohren (@BohrenAn), I'm really sorry that you're being impacted here. I specifically tested this on PowerShell 5.1 prior to us releasing to try and reduce the likelihood customers having a bad time with our latest change to the Authentication module.
This suggests something environment related is going on.
Would you please be able to run the following and provide the output to help here?
Install-Module Microsoft.Graph.Authentication -RequiredVersion 2.34.0 Import-Module Microsoft.Graph.Authentication -RequiredVersion 2.34.0 Connect-MgGraph Get-Module $PSVersionTable
As a point of comparision, here's what I get on my dev box.
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows PS C:\Users\gavinbarron> Install-Module Microsoft.Graph.Authentication -RequiredVersion 2.34.0 PS C:\Users\gavinbarron> Import-Module Microsoft.Graph.Authentication -RequiredVersion 2.34.0 PS C:\Users\gavinbarron> Connect-MgGraph Welcome to Microsoft Graph! Connected via delegated access using 14d82eec-204b-4c2f-b7e8-296a70dab67e Readme: https://aka.ms/graph/sdk/powershell SDK Docs: https://aka.ms/graph/sdk/powershell/docs API Docs: https://aka.ms/graph/docs NOTE: You can use the -NoWelcome parameter to suppress this message. NOTE: Sign in by Web Account Manager (WAM) is enabled by default on Windows systems and cannot be disabled. Any setting stating otherwise will be ignored. PS C:\Users\gavinbarron> Get-Module ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 2.34.0 Microsoft.Graph.Authentication {Add-MgEnvironment, Connect-MgGraph, Disconnect-MgGraph, G... Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con... Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...} Script 1.4.8.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-Pack... Script 2.2.5 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCap... Script 2.0.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS... PS C:\Users\gavinbarron> $PSVersionTable Name Value ---- ----- PSVersion 5.1.26100.6899 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.26100.6899 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 PS C:\Users\gavinbarron> [System.AppDomain]::CurrentDomain.GetAssemblies() | >> Where-Object Location | >> Sort-Object -Property FullName | >> Select-Object -Property FullName FullName -------- Azure.Core, Version=1.50.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 Azure.Identity, Version=1.17.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 Azure.Identity.Broker, Version=1.3.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Microsoft.Graph.Authentication, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.Identity.Client, Version=4.78.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae Microsoft.Identity.Client.Broker, Version=4.78.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae Microsoft.Identity.Client.Extensions.Msal, Version=4.78.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae Microsoft.Identity.Client.NativeInterop, Version=0.19.4.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae Microsoft.IdentityModel.Abstractions, Version=8.15.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.ArchiverProviders, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.CoreProviders, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.MetaProvider.PowerShell, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.MsiProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.MsuProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.NuGetProvider, Version=3.0.0.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.Commands.Diagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.Commands.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.ConsoleHost, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.PackageManagement, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.PSReadLine, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.Security, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.WSMan.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.ClientModel, Version=1.8.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Dynamic, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Security.Cryptography.ProtectedData, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Text.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- addedstatus:waiting-for-author-feedbackIssue that we've responded but needs author feedback to closeIssue that we've responded but needs author feedback to closestatus:needs-more-informationAn issue that requires additional information from issue authorAn issue that requires additional information from issue authorand removedstatus:waiting-for-triageAn issue that is yet to be reviewed or assignedAn issue that is yet to be reviewed or assigned
on Dec 22, 2025 Hi Gavin Barron (@gavinbarron)
Here are the Results you requested
PS C:> Install-Module Microsoft.Graph.Authentication -RequiredVersion 2.34.0 -Force
PS C:> Import-Module Microsoft.Graph.Authentication -RequiredVersion 2.34.0
Import-Module : Method 'GetTokenAsync' in type
'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly
'Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not
have an implementation.
At line:1 char:1- Import-Module Microsoft.Graph.Authentication -RequiredVersion 2.34.0
-
+ CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
PS C:> Connect-MgGraph
Connect-MgGraph : The 'Connect-MgGraph' command was found in the module 'Microsoft.Graph.Authentication', but the
module could not be loaded. For more information, run 'Import-Module Microsoft.Graph.Authentication'.
At line:1 char:1- Connect-MgGraph
-
+ CategoryInfo : ObjectNotFound: (Connect-MgGraph:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
PS C:\> Get-Module ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 0.9.1 M365PSProfile {Add-M365PSProfile, Disconnect-All, Get-M365StandardModule... Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con... Binary 1.2.0 Microsoft.PowerShell.PSResourceGet {Compress-PSResource, Find-PSResource, Get-InstalledPSReso... Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...} Script 1.4.4 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-Pack... Script 2.2.5 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCap... Script 2.0.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS... PS C:\> $PSVersionTable Name Value ---- ----- PSVersion 5.1.26100.7462 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.26100.7462 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 PS C:\> [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object Location | Sort-Object -Property FullName | Select-Object -Property FullName FullName -------- Azure.Core, Version=1.50.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 Microsoft.CertificateServices.PKIClient.Cmdlets, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Microsoft.Graph.Authentication, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.ArchiverProviders, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.CoreProviders, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.MetaProvider.PowerShell, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.MsiProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.MsuProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PackageManagement.NuGetProvider, Version=3.0.0.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.Commands.Diagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.Commands.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.ConsoleHost, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.PackageManagement, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.PSReadLine, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.PowerShell.PSResourceGet, Version=1.1.0.1, Culture=neutral, PublicKeyToken=null Microsoft.PowerShell.Security, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft.WSMan.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.ClientModel, Version=1.8.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.IO.Compression.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- added and removedstatus:waiting-for-author-feedbackIssue that we've responded but needs author feedback to closeIssue that we've responded but needs author feedback to close
on Dec 23, 2025 albertvannijhuis commented
on Dec 23, 2025 More actionsHi! I'm experiencing the same issue with Microsoft.Graph.Authentication version 2.34.0 in an Azure Automation runbook using PowerShell 5.1 since this morning. The runbook worked perfectly before, but now fails with: "Method 'GetTokenAsync' in type 'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly 'Microsoft.Graph.Authentication.Core, Version=2.34.0.0' does not have an implementation."
We're seeing this also in our Azure DevOps pipelines running on Server 2019 / 2022 with PowerShell 5.1
Get-Module Microsoft.Graph -ListAvailable 2025-12-23T09:29:31.2375459Z Name : Microsoft.Graph 2025-12-23T09:29:31.2375960Z Path : C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph\2.34.0\Microsoft.Graph.psd1 2025-12-23T09:29:31.2376711Z Description : Microsoft Graph PowerShell module 2025-12-23T09:29:31.2377203Z Guid : fceec1eb-c2e8-4b2b-a120-0fab3f0d7b47 2025-12-23T09:29:31.2377591Z Version : 2.34.0 2025-12-23T09:29:31.2378005Z ModuleBase : C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph\2.34.0 2025-12-23T09:29:31.2378418Z ModuleType : Manifest 2025-12-23T09:29:31.2378991Z PrivateData : {PSData} 2025-12-23T09:29:31.2380089Z AccessMode : ReadWrite 2025-12-23T09:29:31.2380473Z ExportedAliases : {} 2025-12-23T09:29:31.2380816Z ExportedCmdlets : {} 2025-12-23T09:29:31.2381180Z ExportedFunctions : {} 2025-12-23T09:29:31.2381976Z ExportedVariables : {} 2025-12-23T09:29:31.2382313Z NestedModules : {} 2025-12-23T09:29:31.2382429Z 2025-12-23T09:29:31.3605482Z Get-Module Microsoft.Graph.Authentication -ListAvailable 2025-12-23T09:29:31.3610598Z Name : Microsoft.Graph.Authentication 2025-12-23T09:29:31.3647218Z Path : C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Au 2025-12-23T09:29:31.3647762Z thentication.psd1 2025-12-23T09:29:31.3648177Z Description : Microsoft Graph PowerShell Authentication Module. 2025-12-23T09:29:31.3648586Z Guid : 883916f2-9184-46ee-b1f8-b6a2fb784cee 2025-12-23T09:29:31.3648898Z Version : 2.34.0 2025-12-23T09:29:31.3649256Z ModuleBase : C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0 2025-12-23T09:29:31.3649630Z ModuleType : Script 2025-12-23T09:29:31.3649878Z PrivateData : {PSData} 2025-12-23T09:29:31.3650435Z AccessMode : ReadWrite 2025-12-23T09:29:31.3653123Z ExportedAliases : {[Connect-Graph, Connect-Graph], [Disconnect-Graph, Disconnect-Graph], [Invoke-GraphRequest, 2025-12-23T09:29:31.3653561Z Invoke-GraphRequest], [Invoke-MgRestMethod, Invoke-MgRestMethod]} 2025-12-23T09:29:31.3656535Z ExportedCmdlets : {[Connect-MgGraph, Connect-MgGraph], [Disconnect-MgGraph, Disconnect-MgGraph], [Get-MgContext, 2025-12-23T09:29:31.3657064Z Get-MgContext], [Invoke-MgGraphRequest, Invoke-MgGraphRequest]...} 2025-12-23T09:29:31.3658368Z ExportedFunctions : {[Find-MgGraphCommand, Find-MgGraphCommand], [Find-MgGraphPermission, Find-MgGraphPermission]} 2025-12-23T09:29:31.3658684Z ExportedVariables : {} 2025-12-23T09:29:31.3658942Z NestedModules : {Microsoft.Graph.Authentication, Microsoft.Graph.Authentication.Core} 2025-12-23T09:29:31.3659085Z 2025-12-23T09:29:31.3713867Z Get-Host 2025-12-23T09:29:31.3717947Z Name : ConsoleHost 2025-12-23T09:29:31.3718324Z Version : 5.1.17763.8024 2025-12-23T09:29:31.3719471Z InstanceId : 5ebe4f40-0d40-415c-935f-112cd9b69c53 2025-12-23T09:29:31.3720163Z UI : System.Management.Automation.Internal.Host.InternalHostUserInterface 2025-12-23T09:29:31.3720637Z CurrentCulture : en-US 2025-12-23T09:29:31.3721481Z CurrentUICulture : en-US 2025-12-23T09:29:31.3722035Z PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy 2025-12-23T09:29:31.3723023Z DebuggerEnabled : True 2025-12-23T09:29:31.3723378Z IsRunspacePushed : False 2025-12-23T09:29:31.3724129Z Runspace : System.Management.Automation.Runspaces.LocalRunspace 2025-12-23T09:29:31.3724367Z Import-Module Microsoft.Graph.Authentication 2025-12-23T09:29:31.8600822Z ##[error]Method 'GetTokenAsync' in type 'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly 'Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
On my Windows 11 local machine, where I have Windows PowerShell and PowerShell core, I don't have the issue, even with version 2.34.0
PS C:\WINDOWS\system32> Get-Module microsoft.graph.authentication -ListAvailable Directory: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 2.34.0 Microsoft.Graph.Authentication {Connect-MgGraph, Disconnect-MgGraph, Get-MgContext, Invok... PS C:\WINDOWS\system32> Import-Module microsoft.graph.authentication PS C:\WINDOWS\system32> connect-mpgraph
Sorry, I just clarify - when I said I don't have the issue on my local Windows 11 machine, I meant I don't have it on Windows PowerShell 5.1 with 2.34.0
Thanks for the additional info folks.
Given the error message, "[method] in [assembly] does not have an implementation", it's smelling a bit like a dotnet issue to me. So, I have more questions about your environments. Specifically, what versions of .NET and .NET Framework are available in your Windows PowerShell 5.1 shells.
$release = Get-ItemPropertyValue -LiteralPath 'HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release switch ($release) { { $_ -ge 533320 } { $version = '4.8.1 or later'; break } { $_ -ge 528040 } { $version = '4.8'; break } { $_ -ge 461808 } { $version = '4.7.2'; break } { $_ -ge 461308 } { $version = '4.7.1'; break } { $_ -ge 460798 } { $version = '4.7'; break } { $_ -ge 394802 } { $version = '4.6.2'; break } { $_ -ge 394254 } { $version = '4.6.1'; break } { $_ -ge 393295 } { $version = '4.6'; break } { $_ -ge 379893 } { $version = '4.5.2'; break } { $_ -ge 378675 } { $version = '4.5.1'; break } { $_ -ge 378389 } { $version = '4.5'; break } default { $version = $null; break } } if ($version) { Write-Host -Object ".NET Framework Version: $version" } else { Write-Host -Object '.NET Framework Version 4.5 or later is not detected.' } dotnet --list-runtimes
Additionally, I'm curious as to why you all are using Windows PowerShell 5.1 instead of 7.5? Is there some blocker?
To be completely transparent here, I'm currently on leave and if mother nature plays ball, I'll be offline and skiing until the new year from tomorrow. I apologize that this new version is causing you all problems for you and we'll be working to address them when we return in the new year.
For now, I'd either pin my automation on PS5.1 to 2.33, or if possible, migrate to PS7.5, which you all should be planning on in the longer term anyway.
31 remaining items
And the issue still exists in version 2.36 of the module...
Reacted by Saqib, davidtrevor23, Simon and ░▒▓█│【Walkman】│█▓▒░Christian Schindler (@cnschindler)
Can't confirm. The Problem does not exist anymore in the 2.36 Microsoft.Graph PowerShell Module
$maximumfunctioncount = '32768'
Import-Module Microsoft.Graph
Better load only the Modules you really use
Import-Module Microsoft.Graph.Authentication
If you import the ExchangeOnline Module first - then this happens
Import-Module ExchangeOnlineManagement
The other way around works.
$maximumfunctioncount = '32768'
Import-Module Microsoft.Graph
Import-Module ExchangeOnlineManagement
But AZ PowerShell Module has a Problem then
Kind Regards
AndresI am also seeing this issue, recently installed 2.36.0 and it has started to occur.
I have tried removing the Graph modules and reinstalling, but still see the same problem. This is using Windows Powershell.
Get-InstalledModule Microsoft.Graph* | Uninstall-Module -AllVersions -ForceNo issues when using PowerShell 7.
Update*
Found that the issue for me presents itself only in the PowerShell Extension terminal in VS Code, others have seen this too and seem to think it's the way the extension is loading the modules, when using the regular PowerShell terminal windows in VS code I do not see the issue repeat itself.I'm still feeling stuck on Windows Powershell as well - I need to share my scripts with co-workers, and expecting them to install non-default Powershell is a stretch, especially on servers.
My general use case is to open a Windows Terminal powershell window in the morning, and leave it open all day as I work on issues.
That session may need to connect using Az, MicrosoftTeams, ExchangeOnlineManagement, Microsoft.Graph, ActiveDirectory, PowerCLI - thankfully I've somehow escaped needing to do much in Sharepoint.
Trying to keep track of what order the various modules need to be logged into doesn't really work - I try logging in only once I need to do work in a particular service.
Opening up new powershell windows works around the problem, but the session I leave behind may well have variables loaded up with lists of accounts I'm working on, and it's common to need to compare data across modules.Same issue here, the usual assembly conflicts whenever any of the modules are updated. Have to use Windows PowerShell 5.1 as am using DSC to manage our hybrid environment, so am dependent on the LCM.
Connect-MgGraph : The 'Connect-MgGraph' command was found in the module 'Microsoft.Graph.Authentication', but the module could not be loaded. For more information, run 'Import-Module Microsoft.Graph.Authentication'. At line:1 char:1 + Connect-MgGraph + ~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Connect-MgGraph:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModuleImport-Module Microsoft.Graph.Authentication Import-Module : Method 'GetTokenAsync' in type 'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly 'Microsoft.Graph.Authentication.Core, Version=2.36.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. At line:1 char:1 + Import-Module Microsoft.Graph.Authentication + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommanModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...} Manifest 3.0.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSignature...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...} Script 0.2.0 PowerShellEditorServices.Commands {Clear-Host, ConvertFrom-ScriptExtent, ConvertTo-ScriptExtent, Find-Ast...} Script 2.4.4 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler...} Key : PSVersion Value : 5.1.26100.7920 Name : PSVersion Key : PSEdition Value : Desktop Name : PSEdition Key : PSCompatibleVersions Value : {1.0, 2.0, 3.0, 4.0...} Name : PSCompatibleVersions Key : BuildVersion Value : 10.0.26100.7920 Name : BuildVersion Key : CLRVersion Value : 4.0.30319.42000 Name : CLRVersion Key : WSManStackVersion Value : 3.0 Name : WSManStackVersion Key : PSRemotingProtocolVersion Value : 2.3 Name : PSRemotingProtocolVersion Key : SerializationVersion Value : 1.1.0.1 Name : SerializationVersion[System.AppDomain]::CurrentDomain.GetAssemblies() | Sort-Object -Property FullName | Select-Object -Property Location, FullName Location -------- C:\Users\joe.bloggs\Documents\WindowsPowerShell\Modules\AzureAutomationAuthoringToolkit\0.2.4.2\ISEAddon\AutomationISE.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\Desktop\Azure.Core.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\MediatR.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Bcl.AsyncInterfaces.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.9.2\netFramework\Microsoft.Exchange.Management.AdminApiProvider.dll C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.9.2\netFramework\Microsoft.Exchange.Management.ExoPowershellGalleryModule.dll C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.9.2\netFramework\Microsoft.Exchange.Management.RestApiClient.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Extensions.Configuration.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Extensions.Configuration.Abstractions.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Extensions.DependencyInjection.Abstraction... C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Extensions.Logging.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Extensions.Logging.Abstractions.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Extensions.Options.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.Extensions.Primitives.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Microsoft.Graph.Authentication.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Microsoft.Graph.Authentication.Core.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\Desktop\Microsoft.Identity.Client.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\Microsoft.Identity.Client.Broker.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\Microsoft.Identity.Client.NativeInterop.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\Microsoft.IdentityModel.Abstractions.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Management.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.Management.Infrastructure.Native\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.Native.dll C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.9.2\netFramework\Microsoft.OData.Client.dll C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.9.2\netFramework\Microsoft.Online.CSE.RestApiPowerShellModule.Instrumentation.dll C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.8.1\fullclr\Microsoft.PackageManagement.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Activities\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Activities.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Diagnostics\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Diagnostics.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Management.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.ConsoleHost\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.ConsoleHost.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Core.Activities\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Core.Activities.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PSScriptAnalyzer\1.24.0\Microsoft.PowerShell.CrossCompatibility.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Diagnostics.Activities\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Diagnostics.Activities.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.PowerShell.EditorServices.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Desktop\Microsoft.PowerShell.EditorServices.Hosting.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.GPowerShell\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.GPowerShell.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Management.Activities\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Management.Activities.dll C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.8.1\fullclr\Microsoft.PowerShell.PackageManagement.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PSReadLine\2.4.4\Microsoft.PowerShell.PSReadLine.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PSReadLine\2.4.4\netstd\Microsoft.PowerShell.PSReadLine.Polyfiller.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Security\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Security.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Security.Activities\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Security.Activities.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Utility.Activities\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Utility.Activities.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Workflow.ServiceCore\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Workflow.ServiceCore.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.VisualStudio.Threading.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Microsoft.VisualStudio.Validation.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PSScriptAnalyzer\1.24.0\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PSScriptAnalyzer\1.24.0\Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.WSMan.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.WSMan.Management.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.WSMan.Management.Activities\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.WSMan.Management.Activities.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Nerdbank.Streams.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PSScriptAnalyzer\1.24.0\Newtonsoft.Json.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\Newtonsoft.Json.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\OmniSharp.Extensions.DebugAdapter.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\OmniSharp.Extensions.DebugAdapter.Server.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\OmniSharp.Extensions.JsonRpc.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\OmniSharp.Extensions.LanguageProtocol.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\OmniSharp.Extensions.LanguageServer.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\OmniSharp.Extensions.LanguageServer.Shared.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Activities.Presentation\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.Presentation.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Buffers.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\System.ClientModel.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Collections.Immutable.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.Composition\v4.0_4.0.0.0__b77a5c561934e089\System.ComponentModel.Composition.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Dynamic\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Dynamic.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.IO.Pipelines.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Memory.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Numerics.Vectors.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Reactive.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Emit.ILGeneration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Emit.ILGeneration.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Emit.Lightweight\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Emit.Lightweight.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Runtime.CompilerServices.Unsafe.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.DurableInstancing\v4.0_4.0.0.0__31bf3856ad364e35\System.Runtime.DurableInstancing.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.RuntimeInformation\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.RuntimeInf... C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\System.Text.Json.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Threading.Channels.dll C:\Users\joe.bloggs\.vscode\extensions\ms-vscode.powershell-2025.4.0\modules\PowerShellEditorServices\bin\Common\System.Threading.Tasks.Extensions.dll C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.36.1\Dependencies\System.Threading.Tasks.Extensions.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ValueTuple\v4.0_4.0.0.0__cc7b13ffcd2ddd51\System.ValueTuple.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dlI ran into this issue as well using PowerShell 5.1. This is the version that is launched by default on Windows 11.
Gavin Barron (@gavinbarron) wrote:
..., I'm curious as to why you all are using Windows PowerShell 5.1 instead of 7.5? Is there some blocker?
According to the docs: "PowerShell 7 doesn't replace Windows PowerShell 5.1. It installs to a new directory and runs side-by-side with Windows PowerShell 5.1."
So, 7.5 is something that the user has to explicitly install and explicitly launch ("PowerShell 7") to use, which could explain why there are so many 5.1 users experiencing this issue.
Cheers,
KevinMy problem was solved by :
Uninstall module
- Uninstall module in Powershell ISE / VS code as admin : iam using https://uninstall-graph.merill.net/
1.1. Install-Module Uninstall-Graph
1.2. Uninstall-All
1.3. Closed all powershell terminals ( ISE/ Code etc )
Install module
2.1 Install-Module Microsoft.Graph.Authentication -RequiredVersion 2.33.0 -Repository PSGallery -Force -AllowClobber
2.2 Install-Module Microsoft.Graph -RequiredVersion 2.33.0 -Force -AllowClobberUsing Win11
- Uninstall module in Powershell ISE / VS code as admin : iam using https://uninstall-graph.merill.net/
I am also having the same issue in VSC but not in Terminal...
Version 2.38.1 in PowerShell still has the bug. I had to downgrade to 2.33.0 to be able to connect to MS Graph.
Can confirm this is still an issue as of the latest release. Still have to stick to 2.33 for all of Microsoft.Graph in order to use base functionality.
Same issue here when loading the Exchange Module before the Graph module on 2.39 in Powershell 5.1
Same issue in VS Code PS5.1 using Graph module v 2.39.
Seems to connect-mggraph OK when using ISE..
Was OK on previous version 2.34 - but started failing after moving to 2.39.
Module does not seem to import correctly in VS Code..
Looks like this probably won't be addressed, as Microsoft have announced a twelve-month retirement period to phase out support for Graph SDK modules running on Windows PowerShell 5.1.
Microsoft also announced plans to deliver V3 of the Microsoft Graph PowerShell SDK in Q4 of 2026. SDK V3 is targeted at PowerShell V7 and will not include explicit support for Windows PowerShell 5.1. Organizations that wish to continue running Graph SDK scripts on Windows PowerShell 5.1 must remain on a V2 release because V3 will not support the older runtime.
"If you’re still on Windows PowerShell 5.1, begin planning your move to PowerShell 7.x now. It’s the recommended and only maintained platform going forward, and it delivers the more reliable experience described above."
from MS article linked above





Describe the bug
Import-Module Microsoft.Graph.Authentication
Import-Module : Method 'GetTokenAsync' in type
'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly
'Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not
have an implementation.
At line:1 char:1
Expected behavior
Import-Module Microsoft.Graph.Authentication does not throw an error
How to reproduce
Import-Module Microsoft.Graph.Authentication
SDK Version
2.34.0
Latest version known to work for scenario above?
2.33.0
Known Workarounds
No response
Debug output
Click to expand log
``` Import-Module Microsoft.Graph.Authentication -Debug VERBOSE: Loading module from path 'C:\Users\a.bohren\OneDrive - Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.psd1'.Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
VERBOSE: Cannot verify the Microsoft .NET Framework version 4.7.2 because it is not included in the list of permitted
versions.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Users\a.bohren\OneDrive -
Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.format
.ps1xml'.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.Graph.Authentication.
VERBOSE: Loading module from path 'C:\Users\a.bohren\OneDrive -
Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.dll'.
VERBOSE: Importing cmdlet 'Get-ModuleCmdlet'.
VERBOSE: Importing cmdlet 'Get-ScriptCmdlet'.
VERBOSE: Importing cmdlet 'Connect-MgGraph'.
VERBOSE: Importing cmdlet 'Disconnect-MgGraph'.
VERBOSE: Importing cmdlet 'Add-MgEnvironment'.
VERBOSE: Importing cmdlet 'Get-MgEnvironment'.
VERBOSE: Importing cmdlet 'Remove-MgEnvironment'.
VERBOSE: Importing cmdlet 'Set-MgEnvironment'.
VERBOSE: Importing cmdlet 'Get-MgContext'.
VERBOSE: Importing cmdlet 'Get-MgGraphOption'.
VERBOSE: Importing cmdlet 'Invoke-MgGraphRequest'.
VERBOSE: Importing cmdlet 'Set-MgGraphOption'.
VERBOSE: Importing cmdlet 'Get-MgRequestContext'.
VERBOSE: Importing cmdlet 'Set-MgRequestContext'.
VERBOSE: Importing alias 'Connect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Loading module from path 'C:\Users\a.bohren\OneDrive -
Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.Core.d
ll'.
Import-Module : Method 'GetTokenAsync' in type
'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly
'Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not
have an implementation.
At line:1 char:1