fix: fetch all groups via -AllPages for large tenants
Replaces default 100-item page limits and =999 workarounds with -AllPages on group queries across assignment and baseline scripts. Enables full fzf inline search/filter for group selection.
This commit is contained in:
@@ -252,8 +252,8 @@ Write-Host "Selected $($selectedApps.Count) apps." -ForegroundColor Green
|
||||
|
||||
#region Load Groups
|
||||
Write-Host "`nLoading Azure AD groups..." -ForegroundColor Cyan
|
||||
$groupsResponse = Invoke-GraphRequest "/groups?`$select=id,displayName&`$orderby=displayName"
|
||||
$groups = $groupsResponse.value | Where-Object { $_.displayName } | Sort-Object displayName
|
||||
$groupsResponse = Invoke-GraphRequest "/groups?`$select=id,displayName&`$orderby=displayName" -AllPages
|
||||
$groups = $groupsResponse | Where-Object { $_.displayName } | Sort-Object displayName
|
||||
Write-Host "Found $($groups.Count) groups." -ForegroundColor Green
|
||||
|
||||
$groupDisplayNames = $groups | ForEach-Object { "$($_.displayName) [$($_.id)]" }
|
||||
|
||||
Reference in New Issue
Block a user