You are configuring a custom Webhook endpoint to subscribe to events from an Azure Event Grid custom topic. To begin receiving events, your Webhook endpoint must successfully complete the synchronous validation handshake. What must your Webhook endpoint do when it receives the synchronous validation request from Azure Event Grid?
- AAuthenticate the incoming request by verifying that the request headers contain the endpoint's system-assigned managed identity client ID.
- BRetrieve a SAS token from the request header and save it to an Azure Key Vault secret to establish trust.
- Extract the validation code from the request body and return it in the validationResponse property of the JSON response.Answer
- DGenerate a new cryptographic validation token and return it inside the HTTP headers of the response.
Answer
Extract the validation code from the request body and return it in the validationResponse property of the JSON response.
When Azure Event Grid sends a subscription validation request to a Webhook endpoint, it includes a validationCode in the request body under the data object. To validate the endpoint synchronously, the subscriber must return this validation code in a JSON response using the validationResponse key.
Step-by-Step Solution
Key Concept
Azure Event Grid synchronous Webhook endpoint validation requires the subscriber to echo back the received validationCode in a JSON response containing the validationResponse property.
Estimated Time:1m 0s