You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered an assembly-loading failure at Connect-MgGraph after installing Microsoft Graph PowerShell 2.41.0. Pinning both Microsoft.Graph.Authentication and Microsoft.Graph.Groups to 2.40.0 (the previous version) appears to resolve the failure.
Component
Version
OS
Ubuntu 24.04.4 LTS
PowerShell
7.5.5
PowerShell runtime
.NET 9.0.14
Az.Accounts
5.3.3
Microsoft.Graph.Authentication
2.41.0
Microsoft.Graph.Groups
2.41.0
This runs on an ephemeral Azure DevOps agent. An AzurePowerShell@5 task (using pwsh=true) invokes Redgate Flyway, which launches a child pwsh process for a deployment callback. Diagnostics from the task and a seperate child process both reported the runtime and available module versions above.
Expected behavior
We would expect to be able to roll forward without issue.
How to reproduce
The callback imports the following modules and connects using an access token obtained through Az.Accounts:
This fails with an assembly-loading error referencing:
System.Text.Json, Version=10.0.0.0
SDK Version
2.41.0
Latest version known to work for scenario above?
2.40.0
Known Workarounds
Rolling back to 2.40.0 works as expected.
Installing the umbrella Microsoft.Graph module does NOT resolve the failure.
Installing the .NET 10 SDK on the agent did not resolve the failure, but we did not validate that the PowerShell callback ran under .NET 10 (it is believed we'd need to upgrade PowerShell 7 to do this)
You say your running on Powershell 7.5.x which has .net 9 so it cannot load the requested system.text.json version 10
I don't want to do any remarks on the end of life of certain .net versions that is up to someone else.
Quick fix upgrade PowerShell to 7.6.x
And maybe we have to also bundle and load the system.text.json, instead of relying on the platform provided version.
Fair enough and frankly that's what our internal RCA was coming up with as well. I'm happy to have the issue closed out with a comment to get to 7.6.x (7.5.5 is EOL on 11/10/2026 which is 40 Days out, but that is beside the point).
Same problem affects Azure Automation runbooks using the PowerShell 7.2 and 7.4 runtime environments. Possible workarounds are to use the PowerShell 5.1 runtime environment or a PowerShell V7.2/7.4 runtime environment with older versions of the Graph SDK modules, but that might be possible in all circumstances.
Activity
svrooij commentedon Oct 1, 2026
You say your running on Powershell 7.5.x which has .net 9 so it cannot load the requested system.text.json version 10
I don't want to do any remarks on the end of life of certain .net versions that is up to someone else.
Quick fix upgrade PowerShell to 7.6.x
And maybe we have to also bundle and load the system.text.json, instead of relying on the platform provided version.
aolszowka commentedon Oct 1, 2026
Fair enough and frankly that's what our internal RCA was coming up with as well. I'm happy to have the issue closed out with a comment to get to 7.6.x (7.5.5 is EOL on 11/10/2026 which is 40 Days out, but that is beside the point).
Thanks for the quick response.
12Knocksinna commentedon Oct 3, 2026
Same problem affects Azure Automation runbooks using the PowerShell 7.2 and 7.4 runtime environments. Possible workarounds are to use the PowerShell 5.1 runtime environment or a PowerShell V7.2/7.4 runtime environment with older versions of the Graph SDK modules, but that might be possible in all circumstances.
Load runtime dependencies from module if version is newer (microsoftg…