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

In powershell 5.1: Connect-MgGraph timeout behavior regression in versions >= 2.35 (does not respect 2-minute timeout)

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

メンテナーはふだん 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 の本文から書いたものです。

説明

type:bug
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.
Image

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.
Image

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

環境構築

はじめの一歩

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

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

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

似ている issue

C# の issue をもっと見る

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

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