Graph PowerShell 2.41.0: Connect-MgGraph fails loading System.Text.Json 10; downgrading to 2.40.0 resolves
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- azure, powershell
- 領域
- api, authentication
調査の方向性
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 の本文から書いたものです。
説明
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 ?
- 主要言語
- C#
- スター
- 901
- フォーク
- 232
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-powershell のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
メンテナーはふだん 1 日以内に返信
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoftgraph/msgraph-sdk-powershell#3751 ·
メンテナーはふだん 1 日以内に返信
-
status:waiting-for-triage type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Microsoft.Graph.Authentication fails after removal and re-import in the same PowerShell sessionオープンstatus:waiting-for-triage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
microsoftgraph/msgraph-sdk-powershell#3805 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
microsoftgraph/msgraph-sdk-powershell#3772 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoftgraph/msgraph-sdk-powershell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PCL-Community/PCL-CE#3652 ·
メンテナーはふだん 1 日以内に返信
-
area:frontend bug FE P3
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
klasolsson81/jobbliggaren#2010 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
area: homeblaze type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
RicoSuter/Namotion.Interceptor#630 ·
メンテナーはふだん 1 日以内に返信
-
Akka.Hosting enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100