Skip to content

Commit 0116284

Browse files
committed
Modified to use Get-Tenants instead of direct from table
1 parent cc25135 commit 0116284

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-AddQuarantinePolicy.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ Function Invoke-AddQuarantinePolicy {
1616

1717
$Tenants = ($Request.body.selectedTenants).value
1818

19-
# If allTenants is selected, get all tenants from table and overwrite any other tenant selection
19+
# If allTenants is selected, get all tenants and overwrite any other tenant selection
2020
if ("AllTenants" -in $Tenants) {
21-
$TenantTable = Get-CIPPTable -tablename 'Tenants'
22-
$tenants = (Get-CIPPAzDataTableEntity @TenantTable -Filter "PartitionKey eq 'Tenants'").defaultDomainName
21+
$tenants = (Get-Tenants).defaultDomainName
2322
}
2423

2524
$Result = foreach ($TenantFilter in $tenants) {

0 commit comments

Comments
 (0)