In powershell 5.1: Connect-MgGraph timeout behavior regression in versions >= 2.35 (does not respect 2-minute timeout)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- powershell
調査の方向性
まず、モジュールバージョン 2.25.0 と 2.37.0 を使用して Windows PowerShell 5.1 で Connect-MgGraph の動作を再現し、その後 PowerShell 7 と比較します。約 2 分のタイムアウトが尊重され、WAM のアカウント選択ダイアログが自動的に閉じれば、修正は完了です。この issue ではソースファイルやテストは特定されていません。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
We've observed a change in timeout behavior for Connect-MgGraph across different versions of the Microsoft.Graph PowerShell module. In our teams this behaviour is
In version 2.25:
- The expected timeout of approximately 2 minutes is respected.
- The account selection window (interactive login) closes correctly when the timeout is reached.
In versions 2.35 and later:
- The operation no longer respects the ~2 minute timeout.
- Instead, it fails after approximately 5 minutes.
- Additionally, the WAM account selection dialog does NOT close automatically when the timeout occurs.
- The dialog remains open indefinitely until manually closed by the user.
Actual behavior:
- Timeout occurs after ~5 minutes.
- WAM dialog remains open and must be closed manually.
This appears to be a regression compared to version 2.25, even though previously it was indicated that timeout behavior had not changed.
The WAM dialog not closing is a known issue?
If needed, we can provide additional environment details.
Additional context:
- This behavior has been reproduced across multiple machines.
- Several team members are experiencing the same issue, so it does not appear to be limited to a single environment or device.
Thanks
Expected behavior
- Timeout occurs after ~2 minutes.
- WAM dialog closes automatically.
How to reproduce
Run with 2.25 first and then with 2.37.0
$ini = Date
Write-Output "${ini}: Inicio"
powershell.exe -command {
$tenantId = "xxxx"
Connect-MgGraph -ErrorAction stop -ContextScope Process -TenantId $tenantId
}
$fin = Date
Write-Warning ("Tardó: {0}" -f ($fin - $ini).totalminutes)
SDK Version
2.37.0
Latest version known to work for scenario above?
2.25.0
Known Workarounds
The workaround I found now is not working, sometimes connect-mggraph hangs
UPDATE: As 2026-07-02 with 110 seconds of timeout the workaround is working
With powershell 7 the behaviour is the correct (change powershell.exe to pwsh.exe)
Debug output
Click to expand log
```</details>
### Configuration
Name Value
---- -----
PSVersion 5.1.22621.6931
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.6931
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
### Other information
_No response_
- 主要言語
- C#
- スター
- 901
- フォーク
- 232
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-powershell のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
メンテナーはふだん 2 日以内に返信
-
status:waiting-for-triage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
microsoftgraph/msgraph-sdk-powershell#3822 ·
メンテナーはふだん 2 日以内に返信
-
Microsoft.Graph.Authentication dependency Microsoft.Graph.Authentication.Loader.dll is unsignedオープンstatus:waiting-for-triage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
microsoftgraph/msgraph-sdk-powershell#3819 ·
メンテナーはふだん 2 日以内に返信
-
Connect-MgGraph on 2.41 crashes when making a connection with cert, fixes when using 2.39 or lowerオープンstatus:waiting-for-triage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
microsoftgraph/msgraph-sdk-powershell#3816 ·
メンテナーはふだん 2 日以内に返信
-
status:waiting-for-triage type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · コメント 3 件 · リアクション 3 件 ·
メンテナーはふだん 2 日以内に返信
microsoftgraph/msgraph-sdk-powershell の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 62/100
-
bug misleading tooling trivial
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Docs example projects pinned to a literal library version instead of 3.*対応中かも @DaveSkender が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
facioquo/stock-indicators-dotnet#2372 ·
メンテナーはふだん 1 日以内に返信
-
[Docs] officecli-docx SKILL.md still describes `\n` as a soft line break after #262対応中かも @giprime が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Facepunch/sbox-public#12097 ·
メンテナーはふだん 2 日以内に返信