Get-MgAllSite Doesn't Respect the Top Parameter
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Get-MgAllSite cmdlet から始め、その -Top の処理を、$top=1 と @odata.nextLink を含む Graph のレスポンスと比較します。提示されたフィルターを再現し、不要なリクエストを行わずにコマンドが 1 つのサイトだけを返すことを確認します。
索引モデルが issue の本文から書いたものです。
説明
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
環境構築
- 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
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
microsoftgraph/msgraph-sdk-powershell#3822 ·
メンテナーはふだん 1 日以内に返信
-
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 ·
メンテナーはふだん 1 日以内に返信
-
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 ·
メンテナーはふだん 1 日以内に返信
-
status:waiting-for-triage type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · コメント 3 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
microsoftgraph/msgraph-sdk-powershell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AvaloniaUI/Avalonia#22420 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
dotnet/SqlClient#4823 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area-testing p1-recommended
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
StackExchange/StackExchange.Redis#3269 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信