Forum Discussion
gonxman
Nov 04, 2022Copper Contributor
Sharepoint webhooks - Failed to validate the notification URL
Hi
im trying to create a webhook via our Sharepoint 365
https://tenantname.sharepoint.com/sites/Test_Site/_api/lists/GetByTitle('Documents')/subscriptions
{
"expirationDateTime":"2022-11-06T17:27:00.0000000Z"
}
for some reason sharepoint gives back
<?xml version="1.0" encoding="utf-8"?>
<m:code>-1, System.InvalidOperationException</m:code>
<m:message xml:lang="en-US">Failed to validate the notification URL 'https://somecloud.com/AppFormAPI/rest/v1/notifications'.</m:message>
</m:error>
My postman can trigger the endpoint though so we're not sure where to look.
- SvenSieverdingBronze ContributorIt seems like SharePoint cannot validate the Webhook.
Does your Endpoint return the validationtoken within 5 Seconds, i.e.
POST https://somecloud.com/AppFormAPI/rest/v1/notifications?validationtoken={randomString}
returns {randomString}- gonxmanCopper ContributorEndpoint returns with randomString within 5 secs when tested with Postman. But the Add Subscription call still fails with a 400 Bad Request.
- SvenSieverdingBronze ContributorI once had a similar issue... My problem then was TLS Encryption on my webhook.... You need to have TLS 1.2
https://devblogs.microsoft.com/microsoft365dev/microsoft-graph-subscriptions-deprecating-tls-1-0-and-1-1/
- RobElliottSilver Contributor
gonxman I think it should be getByTitle, not GetByTitle
- gonxmanCopper Contributorjust changed this but still a 400 Bad Request and "Failed to validate the notification URL"
- Bloggs_kp70Copper Contributor
gonxman Did you find a solution for this?
- gonxmanCopper Contributor
Bloggs_kp70 No unfortunately.
- PayelG_msftMicrosoftHi, any update for this issue? I am facing the same issue. Kindly help.