diff --git a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecListBackup.ps1 b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecListBackup.ps1 index 02e8b6527..351f3cb31 100644 --- a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecListBackup.ps1 +++ b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecListBackup.ps1 @@ -10,7 +10,7 @@ function Invoke-ExecListBackup { [CmdletBinding()] param($Request, $TriggerMetadata) $Type = $Request.Query.Type - $TenantFilter = $Request.Query.tenantFilter + $TenantFilter = $Request.Query.tenantFilter ?? $Request.Body.tenantFilter $NameOnly = $Request.Query.NameOnly -eq $true $BackupName = $Request.Query.BackupName diff --git a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecExcludeTenant.ps1 b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecExcludeTenant.ps1 index f8d95351d..3dd8e4c04 100644 --- a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecExcludeTenant.ps1 +++ b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecExcludeTenant.ps1 @@ -34,6 +34,7 @@ Function Invoke-ExecExcludeTenant { $Name = $Request.Query.tenantFilter if ($Request.Query.AddExclusion) { $Tenants = Get-Tenants -IncludeAll | Where-Object { $Request.body.value -contains $_.customerId } + $Name = $Tenants.defaultDomainName -join ',' $Excluded = foreach ($Tenant in $Tenants) { $Tenant.Excluded = $true @@ -48,13 +49,14 @@ Function Invoke-ExecExcludeTenant { if ($Request.Query.RemoveExclusion) { $Tenants = Get-Tenants -IncludeAll | Where-Object { $Request.body.value -contains $_.customerId } + $Name = $Tenants.defaultDomainName -join ',' foreach ($Tenant in $Tenants) { $Tenant.Excluded = $false $Tenant.ExcludeUser = '' $Tenant.ExcludeDate = '' Update-AzDataTableEntity -Force @TenantsTable -Entity $Tenant } - Write-LogMessage -API $APIName -tenant $($Name) -headers $Headers -message "Removed exclusion for customer $($Name)" -Sev 'Info' + Write-LogMessage -API $APIName -tenant $($Name) -headers $Headers -message "Removed exclusion for customer(s): $($Name)" -Sev 'Info' $body = [pscustomobject]@{'Results' = "Success. We've removed $Name from the excluded tenants." } } } catch { diff --git a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-EditSpamFilter.ps1 b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-EditSpamFilter.ps1 index ed72146bf..edcbbbec4 100644 --- a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-EditSpamFilter.ps1 +++ b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-EditSpamFilter.ps1 @@ -9,9 +9,9 @@ Function Invoke-EditSpamFilter { param($Request, $TriggerMetadata) $APIName = $Request.Params.CIPPEndpoint - $TenantFilter = $request.Query.tenantFilter + $TenantFilter = $Request.Query.tenantFilter ?? $Request.Body.tenantFilter $Name = $Request.Query.name ?? $Request.Body.name - $State = $State ?? $Request.Body.state + $State = $Request.Query.State ?? $Request.Body.State try { $Params = @{ diff --git a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-RemoveSpamfilter.ps1 b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-RemoveSpamfilter.ps1 index 2139a1995..c9baed996 100644 --- a/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-RemoveSpamfilter.ps1 +++ b/backend/Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-RemoveSpamfilter.ps1 @@ -11,7 +11,7 @@ Function Invoke-RemoveSpamfilter { $APIName = $Request.Params.CIPPEndpoint $Headers = $Request.Headers - $TenantFilter = $Request.Query.tenantFilter ?? $Request.Query.tenantFilter + $TenantFilter = $Request.Query.tenantFilter ?? $Request.Body.tenantFilter $Name = $Request.Query.name ?? $Request.Body.name