GraphRunner icon indicating copy to clipboard operation
GraphRunner copied to clipboard

Get-SharePointSiteURLs gets only the top 500 results

Open EnriqueHernandezL opened this issue 1 year ago • 0 comments

In large environments, the function won't fetch all sites. The Graph API response contains a boolean field in hitsContainers.moreResultsAvailable indicating whether there are more results to the search or not.

In order to fix this, the function should keep increasing the "from" value of the post body (for example in 500 batches) and repeating the POST request until hitsContainers.moreResultsAvailable is false.

EnriqueHernandezL avatar May 28 '24 07:05 EnriqueHernandezL