Get-MgGroupMember seems to ignore the -PageSize argument
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- powershell
- Ambito
- api
Direzione di ricerca
Inizia riproducendo i due casi di Measure-Command per Get-MgGroupMember con -All e diversi valori di -PageSize. Segui il punto di ingresso della paginazione di Get-MgGroupMember e confronta le richieste o le dimensioni delle pagine utilizzate; il lavoro è completato quando il comando rispetta la dimensione di pagina richiesta oppure il problema viene spiegato come comportamento di Graph API, con un test di regressione ove applicabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When calling this function with -PageSize 999, it's pretty obvious that it is ignoring that and still using the default of 100. In my test case, I'm getting the membership of a group that contains about 3000 people. This should take 3 API calls, but instead takes 30. This is my inference based on the lag/delay of the response taking 30 seconds, vs. a few seconds.
Expected behavior
Respect the -PageSize argument, perform better than 10 seconds for a single command
How to reproduce
$group = Get-MgGroup -Filter "DisplayName eq 'group_name'"
Write-Output "Measuring with page size 999"
Measure-Command {
$members = Get-MgGroupMember -GroupId $group.id -All -PageSize 999
}
Write-Output "Measuring with page size 100"
Measure-Command {
$members = Get-MgGroupMember -GroupId $group.id -All
}
Write-Output "Member count: $($members.Count)"
As you can see, the duration of this API call is nearly the same, regardless of page size.
Measuring with page size 999
Days : 0
Hours : 0
Minutes : 0
Seconds : 27
Milliseconds : 721
Ticks : 277210859
TotalDays : 0.00032084590162037
TotalHours : 0.00770030163888889
TotalMinutes : 0.462018098333333
TotalSeconds : 27.7210859
TotalMilliseconds : 27721.0859
Measuring with page size 100
Days : 0
Hours : 0
Minutes : 0
Seconds : 31
Milliseconds : 812
Ticks : 318127965
TotalDays : 0.000368203663194444
TotalHours : 0.00883688791666667
TotalMinutes : 0.530213275
TotalSeconds : 31.8127965
TotalMilliseconds : 31812.7965
Member count: 2945
SDK Version
2.17.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
The logging output is all sensitive since I'm fetching lists of users, and too large for this input
Configuration
MacOS 15.4.1, though able to reproduce the lag with same module version on Windows 11.
Name Value
---- -----
PSVersion 7.5.1
PSEdition Core
GitCommitId 7.5.1
OS Darwin 24.4.0 Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:39 PDT 2025; root:xnu-114…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Other information
I am unable to determine if this sluggishness is due to the module ignoring -PageSize or due to the Graph API just being too slow for this type of command. Like maybe -PageSize 999 still requires the server to internally fetch in chunks of 100, synchronously, then chunks those responses back to me in the chunks of 999?
- Lingua principale
- C#
- Stelle
- 902
- Fork
- 233
- Merge medio
- 1g 3h
- PR unite (30g)
- 24
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-sdk-powershell
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
I maintainer di solito rispondono entro 1 giorno
-
New-MgGroupMember Missing from DocsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertastatus:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoftgraph/msgraph-sdk-powershell#3751 ·
I maintainer di solito rispondono entro 1 giorno
-
Graph PowerShell 2.41.0: Connect-MgGraph fails loading System.Text.Json 10; downgrading to 2.40.0 resolvesForse già presa @svrooij l’ha presa 1 giorno fa. ApertaNeeds: Attention :wave: status:waiting-for-triage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
microsoftgraph/msgraph-sdk-powershell#3810 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
status:waiting-for-triage type:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Microsoft.Graph.Authentication fails after removal and re-import in the same PowerShell sessionApertastatus:waiting-for-triage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
microsoftgraph/msgraph-sdk-powershell#3805 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoftgraph/msgraph-sdk-powershell
Issue simili
-
S: Untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
space-wizards/space-station-14#46357 ·
I maintainer di solito rispondono entro 1 giorno
-
Versioning_oM: Remove unneeded depeendecy on Test_oMForse già presa @IsakNaslundBh l’ha presa oggi. Apertatype:bug type:compliance
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
MicrosoftLearning/PL-400_Microsoft-Power-Platform-Developer#231 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
joinrpg/joinrpg-net#5313 ·
I maintainer di solito rispondono entro 1 giorno