WebHook Event Delivery
  • Updated on 22 Sep 2019
  • 1 minute to read
  • Contributors
  • Print
  • Comments
  • Share
  • Dark
    Light

WebHook Event Delivery

  • Print
  • Comments
  • Share
  • Dark
    Light

#ServerlessTips - Event Grid
Author: Steef-Jan Wiggers Azure MVP

Azure Event Grid is a service in Azure, which offers a fully managed event-routing service with a publish-subscribe model. You can connect an event source to the event grid service and configure one or more event subscribers to handle the events. When an event is ready in Event Grid, the service will POST an HTTP request to the configured endpoint(s) (subscribers) with the event in the request body.

You must realize that the Event Grid service validates the endpoint first before it pushes events; the validation is either implicit or explicit.

Implicit Endpoint Validation

With Event Grid, you have to prove ownership of your Webhook endpoint before it starts delivering events to that endpoint. For some of the services in Azure like Logic Apps, Functions, and automation via a Webhook Azure does the validation (handshake) for you (implicit).

Explicit Endpoint Validation

In case, you are using another type of endpoints such as a triggered based Function or custom .NET code hosted in an App Service (API) or windows service on-premise your code behind the endpoint will participate in a validation handshake with Event Grid. According to Microsoft documentation, there are two approaches:

• ValidationCode handshake (programmatic)
• ValidationURL handshake (manual)

Validation process

The Microsoft documentation (section validation details) also describes the validation process for the explicit endpoint validation. To consume events from Event Grid either through an HTTP triggered Function or custom code, see the following code sample on GitHub.

Was this article helpful?