Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Graph PowerShell 2.41.0: Connect-MgGraph fails loading System.Text.Json 10; downgrading to 2.40.0 resolves

オープン
#3,810 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
azure, powershell

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

Needs: Attention :wave: status:waiting-for-triage type:bug
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.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)
Debug output

No response

Configuration

No response

Other information

#3789 seems like the likely culprit, thoughts @svrooij ?

主要言語
C#
スター
901
フォーク
232
平均マージ
1日 3時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoftgraph/msgraph-sdk-powershell のほかの issue

microsoftgraph/msgraph-sdk-powershell の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。