Skip to content

Commit b2426a3

Browse files
committed
fix: update tenant filter to 'AllTenants' in alert notifications
1 parent 7c86f60 commit b2426a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-SchedulerCIPPNotifications.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function Push-SchedulerCIPPNotifications {
110110
if ($Currentlog) {
111111
$JSONContent = $Currentlog | ConvertTo-Json -Compress
112112
$Title = "Logbook Notification: Alerts found starting at $((Get-Date).AddMinutes(-15))"
113-
Send-CIPPAlert -Type 'webhook' -Title $Title -JSONContent $JSONContent -TenantFilter $Tenant -APIName 'Alerts' -SchemaSource 'Logbook Notification' -InvokingCommand 'Push-SchedulerCIPPNotifications' -UseStandardizedSchema:$([boolean]$Config.UseStandardizedSchema)
113+
Send-CIPPAlert -Type 'webhook' -Title $Title -JSONContent $JSONContent -TenantFilter 'AllTenants' -APIName 'Alerts' -SchemaSource 'Logbook Notification' -InvokingCommand 'Push-SchedulerCIPPNotifications' -UseStandardizedSchema:$([boolean]$Config.UseStandardizedSchema)
114114
$UpdateLogs = $CurrentLog | ForEach-Object { $_.sentAsAlert = $true; $_ }
115115
if ($UpdateLogs) { Add-CIPPAzDataTableEntity @Table -Entity $UpdateLogs -Force }
116116
}
@@ -120,7 +120,7 @@ function Push-SchedulerCIPPNotifications {
120120
$JSONContent = New-CIPPAlertTemplate -Data $Data -Format 'json' -InputObject 'table' -CIPPURL $CIPPURL
121121
$CurrentStandardsLogs | ConvertTo-Json -Compress
122122
$Title = "Standards Notification: Out of sync standards detected"
123-
Send-CIPPAlert -Type 'webhook' -Title $Title -JSONContent $JSONContent -TenantFilter $Tenant -APIName 'Alerts' -SchemaSource 'Standards Notification' -InvokingCommand 'Push-SchedulerCIPPNotifications' -UseStandardizedSchema:$([boolean]$Config.UseStandardizedSchema)
123+
Send-CIPPAlert -Type 'webhook' -Title $Title -JSONContent $JSONContent -TenantFilter 'AllTenants' -APIName 'Alerts' -SchemaSource 'Standards Notification' -InvokingCommand 'Push-SchedulerCIPPNotifications' -UseStandardizedSchema:$([boolean]$Config.UseStandardizedSchema)
124124
$updateStandards = $CurrentStandardsLogs | ForEach-Object {
125125
if ($_.PSObject.Properties.Name -contains 'sentAsAlert') {
126126
$_.sentAsAlert = $true

0 commit comments

Comments
 (0)