File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Entrypoints/HTTP Functions/CIPP/Core Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,12 @@ function Invoke-ListGraphBulkRequest {
1515 $TenantFilter = $Request.Body.tenantFilter
1616 $AsApp = $Request.Body.asApp
1717 $Requests = $Request.Body.requests
18+ $NoPaginateIds = $Request.Body.noPaginateIds
1819
1920 $GraphRequestParams = @ {
2021 tenantid = $TenantFilter
2122 Requests = @ ()
23+ NoPaginateIds = $NoPaginateIds ?? @ ()
2224 }
2325
2426 if ($AsApp ) {
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ function New-GraphBulkRequest {
88 $NoAuthCheck ,
99 $scope ,
1010 $asapp ,
11- $Requests
11+ $Requests ,
12+ $NoPaginateIds = @ ()
1213 )
1314
1415 if ($NoAuthCheck -or (Get-AuthorisedRequest - Uri $uri - TenantID $tenantid )) {
@@ -43,6 +44,9 @@ function New-GraphBulkRequest {
4344 $Return
4445 }
4546 foreach ($MoreData in $ReturnedData.Responses | Where-Object { $_.body .' @odata.nextLink' }) {
47+ if ($NoPaginateIds -contains $MoreData.id ) {
48+ continue
49+ }
4650 Write-Host ' Getting more'
4751 Write-Host $MoreData.body .' @odata.nextLink'
4852 $AdditionalValues = New-GraphGetRequest - ComplexFilter - uri $MoreData.body .' @odata.nextLink' - tenantid $tenantid - NoAuthCheck $NoAuthCheck - scope $scope - AsApp $asapp
You can’t perform that action at this time.
0 commit comments