Graph PowerShell 2.41.0: Connect-MgGraph fails loading System.Text.Json 10; downgrading to 2.40.0 resolves
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- azure, powershell
- Ambito
- api, authentication
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 ?
- Lingua principale
- C#
- Stelle
- 901
- Fork
- 232
- Merge medio
- 1g 3h
- PR unite (30g)
- 24
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-sdk-powershell
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
I maintainer di solito rispondono entro 1 giorno
-
status:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoftgraph/msgraph-sdk-powershell#3751 ·
I maintainer di solito rispondono entro 1 giorno
-
status:waiting-for-triage type:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Microsoft.Graph.Authentication fails after removal and re-import in the same PowerShell sessionApertastatus:waiting-for-triage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
microsoftgraph/msgraph-sdk-powershell#3805 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
status:waiting-for-triage type:bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
microsoftgraph/msgraph-sdk-powershell#3772 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoftgraph/msgraph-sdk-powershell
Issue simili
-
area:frontend bug FE P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
klasolsson81/jobbliggaren#2010 ·
I maintainer di solito rispondono entro 1 giorno
-
[aw] Upgrade availableApertaagentic-workflows untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
area: homeblaze type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
RicoSuter/Namotion.Interceptor#630 ·
I maintainer di solito rispondono entro 1 giorno
-
Akka.Hosting enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
microsoft/microsoft-ui-xaml#12158 ·
I maintainer di solito rispondono entro 1 giorno