File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Modules/CIPPCore/Public/Entrypoints Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ Function Invoke-ListIntunePolicy {
2424 if ($ID ) {
2525 $GraphRequest = New-GraphGetRequest - uri " https://graph.microsoft.com/beta/deviceManagement/$ ( $urlname ) ('$ID ')" - tenantid $tenantfilter
2626 } else {
27- $Groups = New-GraphGetRequest - uri ' https://graph.microsoft.com/beta/groups' - tenantid $tenantfilter | Select-Object - Property id, displayName
27+ $Groups = New-GraphGetRequest - uri ' https://graph.microsoft.com/beta/groups?$top=999 ' - tenantid $tenantfilter | Select-Object - Property id, displayName
2828
2929 $BulkRequests = [PSCustomObject ]@ (
3030 @ {
@@ -56,7 +56,9 @@ Function Invoke-ListIntunePolicy {
5656
5757 $BulkResults = New-GraphBulkRequest - Requests $BulkRequests - tenantid $TenantFilter
5858
59- $GraphRequest = $BulkResults.body.value | ForEach-Object {
59+ $GraphRequest = $BulkResults | ForEach-Object {
60+ $URLName = $_.Id
61+ $_.body.Value | ForEach-Object {
6062 $policyTypeName = switch - Wildcard ($_ .' assignments@odata.context' ) {
6163 ' *microsoft.graph.windowsIdentityProtectionConfiguration*' { ' Identity Protection' }
6264 ' *microsoft.graph.windows10EndpointProtectionConfiguration*' { ' Endpoint Protection' }
@@ -95,7 +97,7 @@ Function Invoke-ListIntunePolicy {
9597 $_ | Add-Member - NotePropertyName PolicyExclude - NotePropertyValue ($PolicyExclude -join ' , ' )
9698 $_
9799 } | Where-Object { $_.DisplayName -ne $null }
98-
100+ }
99101 }
100102 $StatusCode = [HttpStatusCode ]::OK
101103 } catch {
You can’t perform that action at this time.
0 commit comments