Skip to content

Commit 02b234e

Browse files
committed
fix listgraphrequest alltenants
1 parent 3c66a35 commit 02b234e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Modules/CIPPCore/Public/GraphHelper/New-GraphGetRequest.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function New-GraphGetRequest {
44
Internal
55
#>
66
[CmdletBinding()]
7-
Param(
7+
param(
88
[string]$uri,
99
[string]$tenantid,
1010
[string]$scope,
@@ -67,7 +67,7 @@ function New-GraphGetRequest {
6767
$NextURL = $null
6868
} else {
6969
if ($Data.PSObject.Properties.Name -contains 'value') { $data.value } else { $Data }
70-
if ($noPagination) {
70+
if ($noPagination -eq $true) {
7171
if ($Caller -eq 'Get-GraphRequestList') {
7272
@{ 'nextLink' = $data.'@odata.nextLink' }
7373
}

Modules/CIPPCore/Public/GraphRequests/Get-GraphRequestList.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Get-GraphRequestList {
4747
4848
#>
4949
[CmdletBinding()]
50-
Param(
50+
param(
5151
[string]$TenantFilter = $env:TenantID,
5252
[Parameter(Mandatory = $true)]
5353
[string]$Endpoint,
@@ -69,7 +69,7 @@ function Get-GraphRequestList {
6969
)
7070

7171
$SingleTenantThreshold = 8000
72-
72+
Write-Information "Tenant: $TenantFilter"
7373
$TableName = ('cache{0}' -f ($Endpoint -replace '[^A-Za-z0-9]'))[0..62] -join ''
7474
Write-Information "Table: $TableName"
7575
$Endpoint = $Endpoint -replace '^/', ''
@@ -93,7 +93,7 @@ function Get-GraphRequestList {
9393
}
9494
}
9595
$GraphQuery.Query = $ParamCollection.ToString()
96-
$PartitionKey = Get-StringHash -String (@($Endpoint, $ParamCollection.ToString()) -join '-')
96+
$PartitionKey = Get-StringHash -String (@($Endpoint, $ParamCollection.ToString(), 'v2') -join '-')
9797
Write-Information "PK: $PartitionKey"
9898

9999
# Perform $count check before caching

0 commit comments

Comments
 (0)