Skip to content

Import-Module Microsoft.Graph.Authentication 2.34.0 Error GetTokenAsync #3479

Open

Description

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

  • Import-Module Microsoft.Graph.Authentication
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], TypeLoadException
      + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

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

  • Import-Module Microsoft.Graph.Authentication -Debug
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], TypeLoadException
      + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
</details>


### Configuration

$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

Windows 11 25H2
x64

### Other information

_No response_

Activity

  1. KKing299 commented on Dec 24, 2025

    @KKing299

    Gavin Barron (@gavinbarron) / Any other MS rep - This needs to be escalated. Please see below -
    I have an Azure DevOps pipeline that utilizes Azure PowerShell task. I don't select "Core" and hence my pipeline keeps on failing with the same 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=*' does not have an implementation
    If I select core then it uses 7.4.13 and has no issues. Please fix this for version - 5.1
    Please fix this ASAP!

  2. satishes43 commented on Dec 24, 2025

    @satishes43

    I am also facing same error. It's messed up all authentication.

    ##[error]Failed to import Azure PowerShell modules: 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.

  3. BohrenAn commented on Dec 25, 2025

    @BohrenAn
    Author

    Gavin Barron (@gavinbarron)

    Here are the Result's for the .NET Framework

    PowerShell 5.1
    .NET Framework Version: 4.8.1 or later
    dotnet --list-runtimes
    Microsoft.NETCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

    PowerShell 7.5.4
    .NET Framework Version: 4.8.1 or later
    dotnet --list-runtimes
    Microsoft.NETCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

    Additionally, I'm curious as to why you all are using Windows PowerShell 5.1 instead of 7.5? Is there some blocker?

    The Microsoft.Graph PowerShell Modules are listed as PowerShell 5.1 and higher - so it should simply work there.
    In Addition PowerShell 5.1 is on any supported Windows Installation available by default. So it's convinient to just use what's already available there.
    In more restricted Evironments you're often not allowed to install additional Software or you don't even have Admin Permissions to install PowerShell 7.x.

    Kind Regards
    Andres

  4. Yashaswini2210 commented on Dec 31, 2025

    @Yashaswini2210

    Gavin Barron (@gavinbarron)
    Im also facing the same issue in an automation runbook using powershell 5.1, need quick help
    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.

  5. nburton-loginvsi commented on Dec 31, 2025

    @nburton-loginvsi

    Same thing here. PowerShell 5.1 - rolling back the module to 2.33 seems to fix it.

  6. torque1 commented on Jan 2, 2026

    @torque1

    I'm see the same issue but only when the AZ.Accounts module is also loaded.

    Environment
    Windows 11 24H2 26100.7171
    DotNet 4.8.1 (533320)
    PowerShell: Windows PowerShell: 5.1.26100.7019
    Modules:
    Az.Accounts 5.3.1
    Microsoft.Graph.Authentication 2.34.0

    Scenario 1 – Az.Accounts only (works)

    Import-Module Az.Accounts
    
    Connect-AzAccount `
      -Tenant $env:TenantID `
      -ApplicationId $env:ClientID `
      -CertificateThumbprint $env:CertificateThumbprint `
      -Subscription "CyberSecurity-Prod" 
    

    Result:
    Successfully connects to Azure

    Scenario 2 – Microsoft.Graph.Authentication only (works)

    Import-Module Microsoft.Graph.Authentication
    
    Connect-MgGraph `
      -NoWelcome `
      -TenantId $env:TenantID `
      -ClientId $env:ClientID `
      -CertificateThumbprint $env:CertificateThumbprint
    

    Result:
    Successfully connects to Microsoft Graph.

    Scenario 3 – Graph first, then Az (Az connection fails)

    Import-Module Microsoft.Graph.Authentication
    Import-Module Az.Accounts
    
    Connect-MgGraph `
      -NoWelcome `
      -TenantId $env:TenantID `
      -ClientId $env:ClientID `
      -CertificateThumbprint $env:CertificateThumbprint
    
    Connect-AzAccount `
      -Tenant $env:TenantID `
      -ApplicationId $env:ClientID `
      -CertificateThumbprint $env:CertificateThumbprint `
      -Subscription "CyberSecurity-Prod" | Out-Null
    

    Result:
    Connect-AzAccount fails.

    Connect-AzAccount : Entry point was not found.
    Could not find tenant id for provided tenant domain 'c0988276-7978-4f2a-bd8f-918a37a5c957'.
    Please ensure that the provided service principal
    'c3b16b61-ccd5-4e56-9e4a-b9d520d7ca98' is found in the provided tenant domain.
    
    CategoryInfo          : CloseError
    FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
    

    Scenario 4 – Az first, then Graph (Graph module fails to load)

    Import-Module Az.Accounts
    Import-Module Microsoft.Graph.Authentication
    

    Result:
    Microsoft.Graph.Authentication fails to load.

    Import-Module : 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.
    
    CategoryInfo          : NotSpecified
    FullyQualifiedErrorId : System.TypeLoadException
    
  7. FabienTschanz commented on Jan 2, 2026

    @FabienTschanz
    Contributor

    Gavin Barron (@gavinbarron) I did some more analyzing. The issue can be reproduced in Windows PowerShell if the Microsoft.PowerShell.PSResourceGet module is imported before loading Microsoft.Graph.Authentication. The Azure.Core assembly is loaded from the correct place (the module folder where Microsoft.Graph.Authentication is installed), but it still somehow fails to get the overridden implementation from Microsoft.Graph.Authentication.Core.

    PS D:\> Import-Module Microsoft.PowerShell.PSResourceGet
    PS D:\> get-module
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Script     1.0        M365TenantCollection                {Copy-M365DscModule, Get-EdgePolicyDifferenceAdminVsIntune, Get-M365DscCommands, Initialize-EnterpriseApplication...}
    Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
    Binary     1.1.1      Microsoft.PowerShell.PSResourceGet  {Compress-PSResource, Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository...}
    Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
    Script     2.0.0      PSReadLine                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler...}
    
    
    PS D:\> 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
    + Import-Module Microsoft.Graph.Authentication
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Import-Module], TypeLoadException
        + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    PS D:\> [System.AppDomain]::CurrentDomain.GetAssemblies() | Sort-Object -Property FullName | Select-Object -Property Location, FullName
    
    Location                                                                                                                                                        FullName
    --------                                                                                                                                                        --------
                                                                                                                                                                    Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
    C:\Users\fabie\OneDrive\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\Desktop\Azure.Core.dll                           Azure.Core, Version=1.50.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Users\fabie\OneDrive\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.dll                            Microsoft.Graph.Authentication, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Users\fabie\OneDrive\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.Core.dll                       Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Management.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.dll           Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Management.dll Microsoft.PowerShell.Commands.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll       Microsoft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.ConsoleHost\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.ConsoleHost.dll                 Microsoft.PowerShell.ConsoleHost, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.0\Microsoft.PowerShell.PSReadLine.dll                                                                 Microsoft.PowerShell.PSReadLine, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.1\Microsoft.PowerShell.PSResourceGet.dll                                      Microsoft.PowerShell.PSResourceGet, Version=1.1.0.1, Culture=neutral, PublicKeyToken=null
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Security\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Security.dll                       Microsoft.PowerShell.Security, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll                                                                                                    mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll                                                           netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.1\dependencies\Newtonsoft.Json.dll                                            Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll                                                                     System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\Users\fabie\OneDrive\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.ClientModel.dll                           System.ClientModel, Version=1.8.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll                                         System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll                         System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll                                                           System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll                                                             System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll                                 System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll                                               System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll                         System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll                                                   System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll                                                   System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.1\dependencies\System.Threading.Tasks.Extensions.dll                          System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Users\fabie\OneDrive\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.Threading.Tasks.Extensions.dll            System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll                                             System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll                                                               System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll                                       System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll                                                             System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    I'll try and do some local troubleshooting with cloning the module. Good exercise for debugging.

  8. FabienTschanz commented on Jan 2, 2026

    @FabienTschanz
    Contributor

    Further findings. I managed to track down the issue to the System.Threading.Tasks.Extensions.dll. If I remove this dll from the dependencies folder where Microsoft.PowerShell.PSResourceGet is installed, then it will load it from the location where Microsoft.Graph.Authentication is located and it works. If I don't do that and it is loaded from the PSResourceGet folder, then the issue with GetTokenAsync and its missing implementation appears. If I replace the version that is in the PSResourceGet with the version from the Graph Authentication module, it works as well (just as if you were to delete it).

    So it's another one of those issues with dlls that are already loaded but have something different. I have no clue whatsoever what is different, but here are the two versions:

    # With both System.Threading.Tasks.Extensions.dll present
    PS D:\> Import-Module Microsoft.PowerShell.PSResourceGet
    PS D:\> 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
    + Import-Module Microsoft.Graph.Authentication
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Import-Module], TypeLoadException
        + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    PS D:\> [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object FullName -LIKE "System.Threading.Tasks.Extensions*" | Sort-Object -Property FullName | Select-Object -Property Location, FullName
    
    Location                                                                                                                                             FullName
    --------                                                                                                                                             --------
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.1\dependencies\System.Threading.Tasks.Extensions.dll               System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Users\fabie\OneDrive\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.Threading.Tasks.Extensions.dll System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51

    And the second one:

    # With only System.Threading.Tasks.Extensions.dll present in the Microsoft.Graph.Authentication module directory
    PS D:\> Import-Module Microsoft.PowerShell.PSResourceGet
    PS D:\> Import-Module Microsoft.Graph.Authentication
    PS D:\> [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object FullName -LIKE "System.Threading.Tasks.Extensions*" | Sort-Object -Property FullName | Select-Object -Property Location, FullName
    
    Location                                                                                                                                             FullName
    --------                                                                                                                                             --------
    C:\Users\fabie\OneDrive\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.Threading.Tasks.Extensions.dll System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51

    The issue might be because there are now two versions of the same assembly loaded. As an addition to "if only one version is present it works", it doesn't matter if any of the two versions is present. It can be either 4.2.0.1 or 4.2.1.0, doesn't matter as long as not BOTH are present.

    Edit: This entire thing works in PowerShell 7 because there, the System.Threading.Tasks.Extensions.dll is already preloaded through the executable itself:

    # Fire up PowerShell 7 and execute the following: 
    ❯ Import-Module Microsoft.PowerShell.PSResourceGet
    ❯ Import-Module Microsoft.Graph.Authentication
    ❯ [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object FullName -LIKE "System.Threading.Tasks.Extensions*" | Sort-Object -Property FullName | Select-Object -Property Location, FullName
    
    Location                                                            FullName
    --------                                                            --------
    C:\Program Files\PowerShell\7\System.Threading.Tasks.Extensions.dll System.Threading.Tasks.Extensions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
  9. gavinbarron commented on Jan 5, 2026

    @gavinbarron
    Member

    Thank you Fabien Tschanz (@FabienTschanz) for your excellent work on digging into this. I really appreciate coming back from the break to see this.

    Assembly loading and binding in PowerShell is frankly a nightmare. It sounds like what we're hitting here is this case: https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/resolving-dependency-conflicts?view=powershell-7.5#conflicting-with-another-modules-dependencies

    To everyone else; torque1, Albert van Nijhuis (@albertvannijhuis), Albert van Nijhuis (@albertvannijhuis), Satish Babu Dasari (@satishes43), KKing299, Yashaswini2210, nburton-loginvsi

    As this appears to be an assembly load issue which is happening because the lower version of the System.Threading.Tasks.Extensions assembly is loaded first I need all of you to provide a listing of the assemblies that have been loaded when you encounter this error.

    [System.AppDomain]::CurrentDomain.GetAssemblies() | Sort-Object -Property FullName | Select-Object -Property Location, FullName
  10. torque1 commented on Jan 6, 2026

    @torque1

    Here are the list of assemblies loaded when I get the issue.

    Location                                                                                                                                                                          FullName
    --------                                                                                                                                                                          --------
                                                                                                                                                                                      Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Azure.Core.dll                                                                                    Azure.Core, Version=1.47.3.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\Desktop\Azure.Core.dll                                                              Azure.Core, Version=1.50.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Azure.Identity.dll                                                                                Azure.Identity, Version=1.13.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Azure.Identity.Broker.dll                                                                         Azure.Identity.Broker, Version=1.1.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\FuzzySharp.dll                                                                                                       FuzzySharp, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Hyak.Common.dll                                                                                                      Hyak.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.ApplicationInsights.dll                                                                                    Microsoft.ApplicationInsights, Version=2.18.0.315, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.Common.dll                                                                                           Microsoft.Azure.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.AssemblyLoading.dll                                                                       Microsoft.Azure.PowerShell.AssemblyLoading, Version=5.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Authentication.dll                                                                        Microsoft.Azure.PowerShell.Authentication, Version=5.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Authentication.Abstractions.dll                                                           Microsoft.Azure.PowerShell.Authentication.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll                                                        Microsoft.Azure.PowerShell.Authentication.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Authenticators.dll                                                                        Microsoft.Azure.PowerShell.Authenticators, Version=5.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Aks.dll                                                                           Microsoft.Azure.PowerShell.Clients.Aks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Authorization.dll                                                                 Microsoft.Azure.PowerShell.Clients.Authorization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Compute.dll                                                                       Microsoft.Azure.PowerShell.Clients.Compute, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll                                                                    Microsoft.Azure.PowerShell.Clients.Graph.Rbac, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.KeyVault.dll                                                                      Microsoft.Azure.PowerShell.Clients.KeyVault, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Monitor.dll                                                                       Microsoft.Azure.PowerShell.Clients.Monitor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Network.dll                                                                       Microsoft.Azure.PowerShell.Clients.Network, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll                                                                Microsoft.Azure.PowerShell.Clients.PolicyInsights, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.ResourceManager.dll                                                               Microsoft.Azure.PowerShell.Clients.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Storage.Management.dll                                                            Microsoft.Azure.PowerShell.Clients.Storage.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Clients.Websites.dll                                                                      Microsoft.Azure.PowerShell.Clients.Websites, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll                                                                      Microsoft.Azure.PowerShell.Cmdlets.Accounts, Version=5.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Common.dll                                                                                Microsoft.Azure.PowerShell.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Common.Share.dll                                                                          Microsoft.Azure.PowerShell.Common.Share, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Storage.dll                                                                               Microsoft.Azure.PowerShell.Storage, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Azure.PowerShell.Strategies.dll                                                                            Microsoft.Azure.PowerShell.Strategies, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Microsoft.Bcl.AsyncInterfaces.dll                                                                 Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll                                                                   Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.dll                                                               Microsoft.Graph.Authentication, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.Core.dll                                                          Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Microsoft.Identity.Client.dll                                                                     Microsoft.Identity.Client, Version=4.65.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Microsoft.Identity.Client.Broker.dll                                                              Microsoft.Identity.Client.Broker, Version=4.65.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Microsoft.Identity.Client.Extensions.Msal.dll                                                     Microsoft.Identity.Client.Extensions.Msal, Version=4.65.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Microsoft.Identity.Client.NativeInterop.dll                                                       Microsoft.Identity.Client.NativeInterop, Version=0.16.2.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Microsoft.IdentityModel.Abstractions.dll                                                          Microsoft.IdentityModel.Abstractions, Version=6.35.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Management.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.dll                             Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Management.dll                   Microsoft.PowerShell.Commands.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll                         Microsoft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.ConsoleHost\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.ConsoleHost.dll                                   Microsoft.PowerShell.ConsoleHost, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.0\Microsoft.PowerShell.PSReadLine.dll                                                                                   Microsoft.PowerShell.PSReadLine, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Security\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Security.dll                                         Microsoft.PowerShell.Security, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Rest.ClientRuntime.dll                                                                                     Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.Rest.ClientRuntime.Azure.dll                                                                               Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\Microsoft.WindowsAzure.Storage.dll                                                                                   Microsoft.WindowsAzure.Storage, Version=9.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.WSMan.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.WSMan.Management.dll                                               Microsoft.WSMan.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll                                                                                                                      mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll                                                                             netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net45\Newtonsoft.Json.dll                                                                                        Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll                                                                                       System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Buffers.dll                                                                                System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.ClientModel.dll                                                                            System.ClientModel, Version=1.6.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.ClientModel.dll                                                              System.ClientModel, Version=1.8.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll                                                           System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll                                           System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll                                                                             System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll                                                                               System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net462\System.Diagnostics.DiagnosticSource.dll                                                                   System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll                                                   System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll                                                                       System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll                                                                 System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll                                           System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Memory.dll                                                                                 System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Memory.Data.dll                                                                            System.Memory.Data, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll                                                                     System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Net.Http.WinHttpHandler.dll                                                                System.Net.Http.WinHttpHandler, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll                                                                     System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net46\System.Numerics.Vectors.dll                                                                                System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Private.ServiceModel.dll                                                                   System.Private.ServiceModel, Version=4.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net461\System.Reflection.DispatchProxy.dll                                                                       System.Reflection.DispatchProxy, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll                                                                       System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll                                                                System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.RuntimeInformation\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.RuntimeInformation.dll System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll                                           System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll                                                                     System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Security.AccessControl.dll                                                                 System.Security.AccessControl, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net47\System.Security.Cryptography.Cng.dll                                                                       System.Security.Cryptography.Cng, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net461\System.Security.Cryptography.ProtectedData.dll                                                            System.Security.Cryptography.ProtectedData, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Security.Permissions.dll                                                                   System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Security.Principal.Windows.dll                                                             System.Security.Principal.Windows, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.ServiceModel.Primitives.dll                                                                System.ServiceModel.Primitives, Version=4.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\net462\System.Text.Encodings.Web.dll                                                                             System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Text.Json.dll                                                                              System.Text.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll                                                             System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.Threading.Tasks.Extensions.dll                                               System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll                                                               System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ValueTuple\v4.0_4.0.0.0__cc7b13ffcd2ddd51\System.ValueTuple.dll                                                                 System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll                                                                                 System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll                                                         System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll                                                                               System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.ReaderWriter\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Xml.ReaderWriter.dll                                                     System.Xml.ReaderWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    
    
  11. FabienTschanz commented on Jan 6, 2026

    @FabienTschanz
    Contributor

    Gavin Barron (@gavinbarron) Duplicate dlls from the answer of torque1:

    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\Azure.Core.dll                                                                                    Azure.Core, Version=1.47.3.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\Desktop\Azure.Core.dll                                                              Azure.Core, Version=1.50.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.ClientModel.dll                                                                            System.ClientModel, Version=1.6.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.ClientModel.dll                                                              System.ClientModel, Version=1.8.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
    
    C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll                                                             System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.Threading.Tasks.Extensions.dll                                               System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51

    Again the System.Threading.Tasks.Extension.dll as well as two more. Did a quick check and the two other dlls don't contribute to the issue, it's still only the System.Threading.Tasks.Extensions.dll which causes the error. If I copy the one from the Az.Accounts module over to the Microsoft Graph module, I can successfully import it, but if two versions of this specific dll are present, then it fails.

  12. jenkegels commented on Jan 6, 2026

    @jenkegels

    I'm having the same issue trying to register devices to Autopilot. Hower my assemblies output is different from the output above.
    The error is thrown after executing the command get-windowsautopilotinfo -online - grouptag XXX

    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\Desktop\Azure.Core.dll                                                         Azure.Core, Version=1.50.0.0, Cult...
                                                                                                                                                                                 DynamicClasses, Version=0.0.0.0, C...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.CertificateServices.PKIClient.Cmdlets\v4.0_10.0.0.0__31bf3856ad364e35\Microsoft.CertificateServices.PKIClient.Cmdlets.dll Microsoft.CertificateServices.PKIC...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll                                                              Microsoft.CSharp, Version=4.0.0.0,...
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.dll                                                          Microsoft.Graph.Authentication, Ve...
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.Core.dll                                                     Microsoft.Graph.Authentication.Cor...
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Intune\6.1907.1.0\Microsoft.Intune.PowerShellGraphSDK.dll                                                         Microsoft.Intune.PowerShellGraphSD...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Management.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.dll                        Microsoft.Management.Infrastructur...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Management.Infrastructure.CimCmdlets\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.CimCmdlets.dll  Microsoft.Management.Infrastructur...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.Management.Infrastructure.Native\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.Native.dll            Microsoft.Management.Infrastructur...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Management.Infrastructure.resources\v4.0_1.0.0.0_nl_31bf3856ad364e35\Microsoft.Management.Infrastructure.resources.dll  Microsoft.Management.Infrastructur...
                                                                                                                                                                                 Microsoft.Management.Infrastructur...
    C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\Microsoft.PackageManagement.dll                                                                         Microsoft.PackageManagement, Versi...
    C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\Microsoft.PackageManagement.ArchiverProviders.dll                                                       Microsoft.PackageManagement.Archiv...
    C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\Microsoft.PackageManagement.CoreProviders.dll                                                           Microsoft.PackageManagement.CorePr...
    C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\Microsoft.PackageManagement.MetaProvider.PowerShell.dll                                                 Microsoft.PackageManagement.MetaPr...
    C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\Microsoft.PackageManagement.MsiProvider.dll                                                             Microsoft.PackageManagement.MsiPro...
    C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\Microsoft.PackageManagement.MsuProvider.dll                                                             Microsoft.PackageManagement.MsuPro...
    C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208\Microsoft.PackageManagement.NuGetProvider.dll                                                          Microsoft.PackageManagement.NuGetP...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Diagnostics\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Diagnostics.dll            Microsoft.PowerShell.Commands.Diag...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Management.dll              Microsoft.PowerShell.Commands.Mana...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll                    Microsoft.PowerShell.Commands.Util...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.ConsoleHost\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.ConsoleHost.dll                              Microsoft.PowerShell.ConsoleHost, ...
    C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\Microsoft.PowerShell.PackageManagement.dll                                                              Microsoft.PowerShell.PackageManage...
    C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.0\Microsoft.PowerShell.PSReadLine.dll                                                                              Microsoft.PowerShell.PSReadLine, V...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Security\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Security.dll                                    Microsoft.PowerShell.Security, Ver...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.WSMan.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.WSMan.Management.dll                                          Microsoft.WSMan.Management, Versio...
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll                                                                                                                 mscorlib, Version=4.0.0.0, Culture...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_nl_b77a5c561934e089\mscorlib.resources.dll                                                        mscorlib.resources, Version=4.0.0....
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll                                                                        netstandard, Version=2.0.0.0, Cult...
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\Desktop\Newtonsoft.Json.dll                                                    Newtonsoft.Json, Version=13.0.0.0,...
                                                                                                                                                                                 p33ky2zp, Version=0.0.0.0, Culture...
                                                                                                                                                                                 PSEventHandler, Version=0.0.0.0, C...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll                                                                                  System, Version=4.0.0.0, Culture=n...
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.ClientModel.dll                                                         System.ClientModel, Version=1.8.0....
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll                                                      System.Configuration, Version=4.0....
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll                                      System.Configuration.Install, Vers...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll                                                                        System.Core, Version=4.0.0.0, Cult...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll                                                                          System.Data, Version=4.0.0.0, Cult...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll                                              System.DirectoryServices, Version=...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.Compression\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.dll                                                    System.IO.Compression, Version=4.0...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.Compression.FileSystem\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.FileSystem.dll                              System.IO.Compression.FileSystem, ...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll                                                            System.Management, Version=4.0.0.0...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll                                      System.Management.Automation, Vers...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll                                                                System.Net.Http, Version=4.0.0.0, ...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll                                                                System.Numerics, Version=4.0.0.0, ...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.resources\v4.0_4.0.0.0_nl_b77a5c561934e089\System.resources.dll                                                            System.resources, Version=4.0.0.0,...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading.Tasks.Extensions\v4.0_4.2.0.1__cc7b13ffcd2ddd51\System.Threading.Tasks.Extensions.dll                            System.Threading.Tasks.Extensions,...
    C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Dependencies\System.Threading.Tasks.Extensions.dll                                          System.Threading.Tasks.Extensions,...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll                                                          System.Transactions, Version=4.0.0...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll                                                                          System.Xml, Version=4.0.0.0, Cultu...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll                                                                System.Xml.Linq, Version=4.0.0.0, ...
    C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.resources\v4.0_4.0.0.0_nl_b77a5c561934e089\System.Xml.resources.dll                                                    System.Xml.resources, Version=4.0....
    
    
  13. gavinbarron commented on Jan 6, 2026

    @gavinbarron
    Member

    jenkegels could you also please provide the modules you have loaded?

    Get-Module
  14. neddington commented on Jan 6, 2026

    @neddington

    jenkegels Gavin Barron (@gavinbarron)

    If it's helpful I had to troubleshoot an issue that pertains to this particular issue with Autopilot. Mines a little different though since I do all my Autopilot Enrollment in WinPE Automatically and use the module directly instead of the script.

    The WindowsAutopilotIntune Module is a dependency of the of the Get-WindowsAutoPilotInfo Script. When you utilize get-windowsautopilotinfo -online it installs the WindowsAutopilotIntune module and its required dependancies which are 'Microsoft.Graph.Intune', 'Microsoft.Graph.Groups', and 'Microsoft.Graph.Authentication' to which it installs latest versions of. It looks like Microsoft.Graph.Groups and Microsoft.Graph.Authentication get released at the same time as both are 2.34.0. Just having the Authentication Module on 2.33.0 didn't work for me and to resolve the issue, after the WindowsAutopilotIntune Module was installed along with its required dependancies I removed the Microsoft.Graph.Groups 2.34.0 and Microsoft.Graph.Authentication 2.34.0 modules and then installed the previous versions of both that aren't currently having issues 2.33.0. After that everything went back to functioning as expected.

  15. jenkegels commented on Jan 7, 2026

    @jenkegels

    Gavin Barron (@gavinbarron) the modules listed are:

    • 6.1907.1.0 Microsoft.Graph.Intune
    • 3.1.0.0 Microsoft.PowerShell.Management
    • 3.0.0.0 Microsoft.PowerShell.Security
    • 3.1.0.0 Microsoft.PowerShell.Utility
    • 1.0.0.1 PackageManagement
    • 1.0.0.1 PowerShellGet
    • 2.0.0 PSReadLine

    The commands executed in a clean install OOBE screen are: install-script get-windowsautopilotinfo. That runs fine.
    After that the command get-windowsautopilotinfo -online - grouptag XXX throws the same error as the first post.

    neddington thanks for your feedback. I'll see if I can get around them.

  16. peterboba commented on Jan 7, 2026

    @peterboba

    Similarly to #3479 (comment), we're hitting this issue with Az.Accounts 5.3.1 and Microsoft.Graph.Authentication 2.34.0

    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Try the new cross-platform PowerShell https://aka.ms/pscore6
    
    PS > Get-Module
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
    Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...
    
    
    PS > Import-Module Az.Accounts -RequiredVersion 5.3.1
    PS > 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 > Get-Module
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Script     5.3.1      Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear...
    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...
    
  17. jenkegels commented on Jan 7, 2026

    @jenkegels

    neddington I can confirm that installing versions 2.33 of Microsoft.Graph.groups and Microsoft.Graph.Authentication fixed the issue. We are now able to enroll machines back in Intune using the command get-windowsautopilotinfo. Thank you!

  18. KiranMaji commented on Jan 7, 2026

    @KiranMaji

    Yes, I was facing the same issues while Connect-MgGraph. However, the "Set-MgGraphOption -EnableLoginByWAM $true" or "Set-MgGraphOption -EnableLoginByWAM $false" will not gonna work.

    The only solution is - Uninstall the 2.34 module:
    "Uninstall-Module -Name Microsoft.Graph.Authentication -Force"

    And once you back to the 2.33, all will be works well.

  19. gavinbarron commented on Jan 7, 2026

    @gavinbarron
    Member

    If you want to use Windows PowerShell 5.1 and Microsoft.Graph v2.34 with Az.Accounts <=5.3.1 or Microsoft.PowerShell.PSResourceGet <=1.1.1 at present the best fix it to ensure that you import Microsoft.Graph.Authentication before importing & using those additional modules.

    This is an unfortunate side effect of how assembly loading is handled in PowerShell when there are multiple modules with dependencies of different versions of the same assembly.

  20. FabienTschanz commented on Jan 7, 2026

    @FabienTschanz
    Contributor

    Gavin Barron (@gavinbarron) So no fix will be possible outside of making sure that the Graph module is imported first?

  21. gavinbarron commented on Jan 16, 2026

    @gavinbarron
    Member

    Fabien Tschanz (@FabienTschanz) unfortunately the Microsoft Graph PowerShell module has the highest dependency version at present, and as such needs to be the first think imported and executed.

    PowerShell uses on demand assembly loading so unless an assembly is explicitly loaded during import then PowerShell won't load the assembly until a code path is executed that requires that assembly. Take a look at this article for a deep dive into this problem: https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/resolving-dependency-conflicts?view=powershell-7.5#conflicting-with-another-modules-dependencies

    This is the same root cause as #3394

    Likely when Az.Accounts next release they'll bump the version of the impacted assembly and the issue will either be resolved or reversed.

    I'm reaching out to folks internally to see if we can coordinate a durable fix for the Microsoft owned auth libraries.

  22. FabienTschanz commented on Jan 17, 2026

    @FabienTschanz
    Contributor

    Gavin Barron (@gavinbarron) I'm pretty familiar with how the dependencies are load. Not an expert but traced it a couple of times already. If I were a module developer, I'd try to limit the necessary dependencies to a minimum and only use additional libraries if not possible any other way. I'd expect that you're going with this approach already, don't you? If it is possible to strip one of the libraries and the effort to do so justifies it, then it would benefit the people using the modules by preventing possible conflicts.

    Because Windows PowerShell is still the default and PowerShell 7 is not, most users will stick to Windows PowerShell and some applications (like the Local Configuration Manager for Desired State Configuration) have a hard dependency on it. From the Microsoft365DSC team, we are running into those dependency conflicts on almost a monthly basis and it's very much painful because at one point, we have no other choice but to drop support for a combination of workloads.

    One example here is SPO and Graph, when we're running those two workloads side-by-side, at least one of them will fail because of the assembly conflicts. No way around it except running them separately. But how can we tell this to the users? Switching to PowerShell 7 is not yet possible and takes more time, especially when we have to make sure that everything still works after doing so. We'd be very happy if there will be some coordination inside Microsoft to minimize these disruptions.

    Appreciate the effort, looking forward to what's coming next.

  23. peterboba commented on Jan 28, 2026

    @peterboba

    This seems to have been mitigated now when using version 5.3.2 of Az.Accounts along with 2.34.0 of Microsoft.Graph.Authentication.

  24. Jolinda1101 commented on Feb 3, 2026

    @Jolinda1101

    Hi team,
    I've similar issue. I've upgraded Az.Accounts to version 5.3.2 along with 2.34.0 of Microsoft.Graph.Authentication, but still got the same error. Could you help to advice the other mitigation? Thanks.

  25. robinmalik commented on Feb 12, 2026

    @robinmalik

    We upgraded from 2.28 to 2.35.1 and unfortunately this broke everything Graph related under PowerShell 5.1 as we can't connect with that. 2.33 is the fix, pending what I assume is updating every possible calling script to forcefully import the modules.

  26. cnschindler commented on Mar 15, 2026

    @cnschindler

    And the issue still exists in version 2.36 of the module...

  27. BohrenAn commented on Mar 16, 2026

    @BohrenAn
    Author

    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

    Image

    If you import the ExchangeOnline Module first - then this happens
    Import-Module ExchangeOnlineManagement

    Image

    The other way around works.
    $maximumfunctioncount = '32768'
    Import-Module Microsoft.Graph
    Import-Module ExchangeOnlineManagement
    But AZ PowerShell Module has a Problem then

    Image

    Kind Regards
    Andres

  28. saqib-s commented on Mar 18, 2026

    @saqib-s

    I 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 -Force

    No 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.

  29. zaaj commented on Mar 27, 2026

    @zaaj

    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.

  30. Borgquite commented on Apr 13, 2026

    @Borgquite

    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 : CouldNotAutoloadMatchingModule
    
    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.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.ImportModuleComman
    
    ModuleType 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.dl
    
  31. mrkmcnamee commented on Apr 28, 2026

    @mrkmcnamee

    I 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,
    Kevin

  32. fardinbarashi commented on Apr 30, 2026

    @fardinbarashi

    My problem was solved by :

    Uninstall module

    1. 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 -AllowClobber

    Using Win11

  33. FashionOu commented on May 25, 2026

    @FashionOu

    we can also reproduce the issue in 2.37.0

    Image
  34. Ar5had07 commented on Jun 17, 2026

    @Ar5had07

    I'm facing this exact issue in VSCode, but not in Terminal (version 2.38.0)

    VSCode

    Image

    Terminal

    Image
  35. HorridMutilation commented on Jul 15, 2026

    @HorridMutilation

    I am also having the same issue in VSC but not in Terminal...

  36. PerryVerheij commented on Jul 21, 2026

    @PerryVerheij

    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.

  37. tea-pope commented on Aug 7, 2026

    @tea-pope

    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.

  38. haydgsky commented on Aug 10, 2026

    @haydgsky

    Same issue here when loading the Exchange Module before the Graph module on 2.39 in Powershell 5.1

  39. neilpeel13 commented on Aug 21, 2026

    @neilpeel13

    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..

  40. saqib-s commented on Sep 18, 2026

    @saqib-s

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions