Getting validation handshake failed exception while configuring webhook for event subscription

Debashis Jena 71 Reputation points
2023-06-21T07:15:24.0966667+00:00

Hi,

I'm opting webhook option while configuring Event subscription for Azure Communication service SMS delivery report event.

I'm using Azure HTTP trigger function as webhook. This Azure function is present inside VNET and Communication service is publicly available.

But getting below error while configuring webhook for Azure communication service Event subscription.

Deployment has failed with the following error: {"code":"Url validation","message":"Webhook validation handshake failed for https://<function name>.azurewebsites.net/api/SMSStatusCallback?code=<Function code> Http POST request failed with response code Unknown. For troublehooting, visit https://aka.ms/esvalidation. Activity id:b1060cdf-0ffd-449b-84bf-1c525b37ee76, timestamp: 6/20/2023 4:19:12 PM (UTC)."}

Please let me know what might be the reason for this error and how to resolve it.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,001 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
424 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 18,816 Reputation points
    2023-07-11T20:03:29.05+00:00

    Hi @Debashis Jena

    thanks for your patience. The error message you are seeing indicates that the webhook validation handshake failed for your Azure HTTP trigger function. The Handshake can fail if the webhook is not handling the Subscription Validation event. Is this the first time you have seen this error? Is there a way we can see the Azure Function code and your webhook configuration? A screenshot would work.

    You can also look at activity logs and see if you can find more information by your activity Id. 

    WebHook event delivery - Azure Event Grid | Microsoft Learn

    Authenticate event delivery to event handlers (Azure Event Grid) - Azure Event Grid | Microsoft Learn

    Here is more documentation on VNet 

    Network security for Azure Event Grid resources - Azure Event Grid | Microsoft Learn

     

    We look forward to hearing from you.

    Best,

    Grace

     

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.