Graph PowerShell 2.41.0: Connect-MgGraph fails loading System.Text.Json 10; downgrading to 2.40.0 resolves
Les mainteneurs répondent en général sous 2 jours
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- azure, powershell
- Domaine
- api, authentication
Piste de recherche
Begin with the dependency change associated with #3789 and the Microsoft.Graph.Authentication entry point used by Connect-MgGraph; reproduce on the listed PowerShell and .NET versions. Trace the System.Text.Json 10 load path and verify that the callback connects on 2.41.0 without pinning 2.40.0.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
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:
Import-Module Az.Accounts -ErrorAction Stop
Import-Module Microsoft.Graph.Authentication -ErrorAction Stop
Import-Module Microsoft.Graph.Groups -ErrorAction Stop
$azContext = Get-AzContext -ErrorAction Stop
$graphAccessToken = (
Get-AzAccessToken `
-ResourceTypeName MSGraph `
-TenantId $azContext.Tenant.Id `
-AsSecureString
).Token
Connect-MgGraph -AccessToken $graphAccessToken -NoWelcome
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.Graphmodule 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)
Debug output
No response
Configuration
No response
Other information
#3789 seems like the likely culprit, thoughts @svrooij ?
- Langage dominant
- C#
- Étoiles
- 903
- Forks
- 235
- Merge moyen
- 2 j 8 h
- PR mergées (30 j)
- 18
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoftgraph/msgraph-sdk-powershell
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
Les mainteneurs répondent en général sous 2 jours
-
status:waiting-for-triage type:bug
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
microsoftgraph/msgraph-sdk-powershell#3831 ·
Les mainteneurs répondent en général sous 2 jours
-
status:waiting-for-triage type:feature
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 8/100
microsoftgraph/msgraph-sdk-powershell#3827 ·
Les mainteneurs répondent en général sous 2 jours
-
status:waiting-for-triage type:bug
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
microsoftgraph/msgraph-sdk-powershell#3822 ·
Les mainteneurs répondent en général sous 2 jours
-
Microsoft.Graph.Authentication dependency Microsoft.Graph.Authentication.Loader.dll is unsignedPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertestatus:waiting-for-triage type:bug
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
microsoftgraph/msgraph-sdk-powershell#3819 ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de microsoftgraph/msgraph-sdk-powershell
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
KnifeLemon/Filee#363 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
-
area-Native untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
dotnet/machinelearning#7837 ·
Les mainteneurs répondent en général sous 2 jours
-
[CI] .trgen-ignore required for several grammars.Peut-être pris @kaby76 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
antlr/grammars-v4#5073 ·
Les mainteneurs répondent en général sous 1 jour
-
[Enhancement]: Add a search box to the Time Zone dropdownPeut-être pris @idumlupinar l’a pris aujourd’hui. OuverteStatus: New
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
dnnsoftware/Dnn.Platform#7579 ·
Les mainteneurs répondent en général sous 2 jours