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

Get-MgAllSite Doesn't Respect the Top Parameter

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
powershell
領域
api, cli

調査の方向性

Get-MgAllSite cmdlet から始め、その -Top の処理を、$top=1 と @odata.nextLink を含む Graph のレスポンスと比較します。提示されたフィルターを再現し、不要なリクエストを行わずにコマンドが 1 つのサイトだけを返すことを確認します。

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

説明

Service issue Status: Needs Investigation type:bug
Describe the bug

I am trying to find the first site with a display name starting with A. The cmdlet ignores the Top parameter (it's also incredibly slow - debug implies that multiple HTTP requests are made to retrieve the sites) and returns all sites with a displayname starting with A.

[array]$Sites = Get-MgAllSite -filter "startsWith(displayName,'A')" -top 1
$Sites.displayName

Azure Automation Runbook Fans
Alain Charnier
Andy's Christmas Party
ALL-IN-1 MAIL
ALL-IN-1 for DOS
Atlanta Restaurants
Ann Conroy (GM Datacenters)
All R &A Users-Everyone is Welcome
Audi e-tron Drivers - Secret Car Plans
All Tenant Member User Accounts
Andrew's Maintenance Planners (Teamwith a

Expected behavior

The expected behavior is that the cmdlet should comply with the Top parameter and return the number of sites specified in the parameter.

How to reproduce

See above.

SDK Version

V2.30

Latest version known to work for scenario above?

No response

Known Workarounds

Use the Graph API request.

Debug output

Status Code:
OK

Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 4492f3cc-5c24-4167-8b87-e06724efd3ab
client-request-id : a936e6e8-ed31-42f3-9bc3-81bdedfec988
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"DU2PEPF0004582C"}}
splogid : 7c82c8a1-9074-a000-4211-67c9056cbfb7
odata-version : 4.0
Date : Tue, 23 Sep 2025 09:50:03 GMT

Body:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/sites/microsoft.graph.getAllSites()?$top=1&$filter=startsWith(displayName%2c%27A%27)&$skiptoken=UGFnZWQ9VFJVRSZwX1RpbWVEZWxldGVkPSZwX0lEPTcwNQ",
"value": [
{
"createdDateTime": "2025-01-22T11:19:37Z",
"id": "redmondassociates.sharepoint.com,7b8c30d5-81a2-4582-bd15-d20e5c3091f5,4f47b8eb-8301-4678-b567-e29204a42441",
"name": "Azure Automation Runbook Fans",
"webUrl": "https://redmondassociates.sharepoint.com/sites/Azure.Automation.Fans",
"displayName": "Azure Automation Runbook Fans",
"isPersonalSite": false,
"siteCollection": {
"hostname": "redmondassociates.sharepoint.com"
},
"root": {}
}
]
}

Click to expand log


<Log output here>

Configuration

No response

Other information

$psversiontable

Name Value


PSVersion 7.5.3
PSEdition Core
GitCommitId 7.5.3
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

主要言語
C#
スター
902
フォーク
233
平均マージ
1日 20時間
マージ済み PR(30日)
30

環境構築

はじめの一歩

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

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

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

似ている issue

C# の issue をもっと見る

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

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