Skip to content

Commit d2c4831

Browse files
authored
Merge pull request #201 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 4f53a8c + ee1aaf4 commit d2c4831

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ExecBPA.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ function Invoke-ExecBPA {
1111
$ConfigTable = Get-CIPPTable -tablename Config
1212
$Config = Get-CIPPAzDataTableEntity @ConfigTable -Filter "PartitionKey eq 'OffloadFunctions' and RowKey eq 'OffloadFunctions'"
1313

14+
$TenantFilter = $Request.Query.tenantFilter ?? $Request.Body.tenantFilter
15+
1416
if ($Config -and $Config.state -eq $true) {
1517
if ($env:CIPP_PROCESSOR -ne 'true') {
1618
$Parameters = @{Force = $true }
17-
if ($Request.Query.TenantFilter) {
18-
$Parameters.TenantFilter = $Request.Query.TenantFilter
19-
$RowKey = "Start-BPAOrchestrator-$($Request.Query.TenantFilter)"
19+
if ($TenantFilter -and $TenantFilter -ne 'AllTenants') {
20+
$Parameters.TenantFilter = $TenantFilter
21+
$RowKey = "Start-BPAOrchestrator-$($TenantFilter)"
2022
} else {
2123
$RowKey = 'Start-BPAOrchestrator'
2224
}

0 commit comments

Comments
 (0)