Webhook validation handshake failed with response code unknown

Prashant Verma 0 Reputation points Microsoft Employee
2024-08-08T06:45:18.16+00:00

I'm unable to update the webhook endpoint of Event grid subscription. I've created a new http triggered azure function and I'm trying to update the webhook endpoint point of an event subscription to this new function.

After update the endpoint and adding x-function-key in Header in Delivery Properties, I'm getting an error while saving it saying:

Deployment has failed with the following error: {"code":"URL validation","message":"Webhook validation handshake failed for https://eventgridl3functionapp.azurewebsites.net/api/eventgridl3functionapp. Http POST request failed with response code Unknown. For troubleshooting, visit https://aka.ms/esvalidation. Activity id:5dae7825-6144-4d9d-8adf-3b764bb6a7f7, timestamp: 8/8/2024 5:22:40 AM (UTC)."}

Could anyone assist me in debugging this?

I was able to update the event subscription webbook endpoint few days back and then I updated the http trigger function (removed some unnecessary logs from there) and now I'm unable to update the endpoint. Can I find specific error using the Activity Id?

Not sure if it's related but found this in application insights traces and exception - "Category":"Function.EventGridL3FunctionApp","HostInstanceId":"aa480e87-5e33-498e-ae82-c36aec5c20f5","LogLevel":"Error","prop__{OriginalFormat}":"Microsoft.Azure.WebJobs.Host: Error indexing method 'EventGridL3FunctionApp'. System.Private.CoreLib: Could not load file or assembly 'System.Linq.Expressions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified."

User's image

This is the code for how I'm handing the validation event but it seems it is not even reaching to this function because there are no logs for "HTTP trigger received" in application insights.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,890 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
376 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 32,011 Reputation points MVP
    2024-08-08T23:38:58.4833333+00:00

    Hello @Prashant Verma,

    welcome to this moderated Azure community forum.

    Have you considered the 'EventGridTrigger'?

    The handshake is done automatically.

    See also this example on GitHub which works fine with an EventGrid Topic WebHook destination.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    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.