File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Graph Requests Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,16 @@ function Push-ListGraphRequestQueue {
4040
4141 $RawGraphRequest = try {
4242 $Results = Get-GraphRequestList @GraphRequestParams
43- $Results | Select-Object - First ($Results.Count - 1 )
43+ if ($Results [-1 ].PSObject.Properties.Name -contains ' nextLink' ) {
44+ $Results | Select-Object - First ($Results.Count - 1 )
45+ } else {
46+ $Results
47+ }
4448 } catch {
4549 $CippException = Get-CippException - Exception $_.Exception
4650 [PSCustomObject ]@ {
47- Tenant = $Item.TenantFilter
48- CippStatus = " Could not connect to tenant. $ ( $CippException.NormalizedMessage ) "
51+ Tenant = $Item.TenantFilter
52+ CippStatus = " Could not connect to tenant. $ ( $CippException.NormalizedMessage ) "
4953 CippException = [string ]($CippException | ConvertTo-Json - Depth 10 - Compress)
5054 }
5155 }
You can’t perform that action at this time.
0 commit comments