EventGrid topic handshake validation fails

Harel Danieli 0 Reputation points
2024-08-12T07:25:27.0066667+00:00

Hey all!
I'm trying to create an event subscription with webhook through azure event grid and for some reason the handshake validation fails.
I don't understand why since I can see I am returning the correct response when I test the endpoint...
Returning { validationResponse: <code passed> } from an HTTPs POST with status code 200.
What could be wrong?

Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
390 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshukatara-6769 10,130 Reputation points
    2024-08-12T07:32:11.32+00:00

    Hi Harel, Welcome to MS Q&A

    Even if your HTTPS POST is returning a status code 200, there are still a few potential issues that could cause the handshake validation to fail:

    1. Response Format: Ensure that the response format is exactly as expected. The response should be a JSON object with the validationResponse property containing the validation code.
    2. Content-Type Header: Verify that the Content-Type header of your response is set to application/json.
    3. Validation Code: Double-check that the validation code you are returning matches the one sent by Azure Event Grid in the SubscriptionValidationEvent.
    4. Network Issues: Ensure there are no network issues or firewalls blocking the request from Azure Event Grid to your endpoint.
    5. Endpoint URL: Confirm that the endpoint URL is correct and accessible from the internet.
    6. SSL/TLS Configuration: Ensure that your endpoint supports the required SSL/TLS configurations. Azure Event Grid requires HTTPS endpoints with valid SSL certificates.
    7. logging: Check your server logs to see if there are any errors or issues when handling the validation request.

    By verifying these aspects, you can ensure that your webhook endpoint is correctly handling the validation handshake from Azure Event Grid

    For more detailed troubleshooting, you can refer to the following resources:

    Please check and let us know

    Thanks
    Deepanshu

    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.