Skip to content

Commit

Permalink
AsApp support
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Oct 3, 2024
1 parent 125aaf1 commit 0546b72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function Push-ListGraphRequestQueue {
NoPagination = $Item.NoPagination
ReverseTenantLookupProperty = $Item.ReverseTenantLookupProperty
ReverseTenantLookup = $Item.ReverseTenantLookup
AsApp = $Item.AsApp ?? $false
SkipCache = $true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ function Get-GraphRequestList {
[switch]$CountOnly,
[switch]$NoAuthCheck,
[switch]$ReverseTenantLookup,
[string]$ReverseTenantLookupProperty = 'tenantId'
[string]$ReverseTenantLookupProperty = 'tenantId',
[boolean]$AsApp = $false
)

$SingleTenantThreshold = 8000
Expand Down Expand Up @@ -110,6 +111,9 @@ function Get-GraphRequestList {
if ($NoAuthCheck.IsPresent) {
$GraphRequest.noauthcheck = $NoAuthCheck.IsPresent
}
if ($AsApp) {
$GraphRequest.asApp = $AsApp
}
if ($Parameters.'$count' -and !$SkipCache.IsPresent -and !$NoPagination.IsPresent) {
$Count = New-GraphGetRequest @GraphRequest -CountOnly -ErrorAction Stop
if ($CountOnly.IsPresent) { return $Count }
Expand Down Expand Up @@ -174,6 +178,8 @@ function Get-GraphRequestList {
NoPagination = $using:NoPagination.IsPresent
ReverseTenantLookupProperty = $using:ReverseTenantLookupProperty
ReverseTenantLookup = $using:ReverseTenantLookup.IsPresent
NoAuthCheck = $using:NoAuthCheck.IsPresent
AsApp = $using:AsApp
SkipCache = $true
}

Expand Down Expand Up @@ -220,6 +226,7 @@ function Get-GraphRequestList {
PartitionKey = $PartitionKey
NoPagination = $NoPagination.IsPresent
NoAuthCheck = $NoAuthCheck.IsPresent
AsApp = $AsApp
ReverseTenantLookupProperty = $ReverseTenantLookupProperty
ReverseTenantLookup = $ReverseTenantLookup.IsPresent
}
Expand Down

0 comments on commit 0546b72

Please sign in to comment.