Skip to content

Commit 62c03a6

Browse files
authored
Merge pull request KelvinTegelaar#1185 from JohnDuprey/dev
fix public webhooks issue
2 parents 0e5b281 + 882f06c commit 62c03a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Alerts/Invoke-PublicWebhooks.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ function Invoke-PublicWebhooks {
6565
}
6666
Add-CIPPAzDataTableEntity @WebhookIncoming -Entity $Entity
6767
} else {
68-
return 'Not replying to this webhook or processing it'
68+
$Body = 'This webhook is not authorized.'
69+
$StatusCode = [HttpStatusCode]::Forbidden
6970
}
7071
$Body = 'Webhook Recieved'
7172
$StatusCode = [HttpStatusCode]::OK
@@ -80,4 +81,4 @@ function Invoke-PublicWebhooks {
8081
StatusCode = $StatusCode
8182
Body = $Body
8283
})
83-
}
84+
}

0 commit comments

Comments
 (0)