Note: PowerShell integration requires a ShareGate Migrate Pro or Enterprise subscription. It is not available on the Essentials plan.
Symptoms
When you run Import-Module ShareGate in PowerShell, you get the following error:
Import-Module: Method not found: 'System.Collections.Generic.IList`1<System.Net.Http.DelegatingHandler> Microsoft.Graph.GraphClientFactory.CreateDefaultHandlers(Microsoft.Graph.GraphClientOptions)'
Error code
Not applicable.
Details
This error occurs when the Microsoft Graph SDK version 2.36.0 or later is installed at the system level on your machine.
ShareGate Migrate includes its own bundled version of the Microsoft Graph DLLs.
When a newer version of the Microsoft Graph SDK is installed system-wide, PowerShell loads it instead of ShareGate Migrate's bundled version.
Version 2.36.0 removed a method that ShareGate Migrate relies on, causing the module to fail during import.
Solution
You can try to downgrade the Microsoft Graph SDK to a compatible version:
Open PowerShell as administrator.
Run the following command to remove all installed versions of the Microsoft Graph SDK:
Uninstall-Module Microsoft.Graph -AllVersions -Force
Run the following command to install a compatible version:
Install-Module Microsoft.Graph -RequiredVersion 2.28.0 -Force
Restart PowerShell and run
Import-Module ShareGateagain.
Caution: Downgrading the Graph SDK could affect other applications on your system. You make these changes at your own risk.
If you still get the error
Contact our support team with the following:
The full error message
The Microsoft Graph SDK version currently installed on your machine (run
Get-InstalledModule Microsoft.Graphto check)What you've already tried
