Closed
Description
I create a test tenant with 40,000 users.
Using PowerShell 5.1, "Get-MgUser -All" causes the StackOverflowExeption.
Given the related issue (#949), This result is to be expected.
Howerver, "Get-MgUser -All -PageSize 400" succeed.
Why does it work with large PageSize ?
The result of verification is as follows:
PS C:\Users\kutsu> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.22000.593
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22000.593
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\Users\kutsu> (Get-MgUser -All -PageSize 400).count
40002
PS C:\Users\kutsu> (Get-MgUser -All).count
Process is terminated due to StackOverflowException.