You are designing an integration solution that uses Azure Event Grid to route messages to a custom Webhook endpoint. You need to configure an Event Grid subscription for a custom topic with the following requirements:
- The subscription must write any events that cannot be delivered to an Azure Blob Storage container named undelivered.
- The subscription must authenticate to the Storage account using its own system-assigned managed identity to write the dead-lettered events.
- The Webhook endpoint must successfully receive events by completing the standard synchronous validation handshake during subscription creation.
Which set of configurations must you implement to meet these requirements?
- Configure the Webhook to return the validation code from the validation event payload in the response body. Enable the system-assigned managed identity on the Event Grid subscription and assign it the Storage Blob Data Contributor role on the Storage account.Answer
- BConfigure the Webhook to respond with a HTTP 200 OK without a response body. Generate a Shared Access Signature (SAS) token at the container level with write permission and include it in the dead-letter destination configuration.
- CConfigure the Webhook to return the validation code from the validation event payload in the response body. Enable a user-assigned managed identity on the Event Grid subscription, assign it the Storage Queue Data Message Sender role, and configure an Azure Queue Storage queue as the dead-letter destination.
- DConfigure the Webhook to return the validation code from the validation event payload in the response body. Enable the system-assigned managed identity on the Event Grid subscription and assign it the Storage Blob Data Reader role on the Storage account.
Answer
Configure the Webhook to return the validation code from the validation event payload in the response body. Enable the system-assigned managed identity on the Event Grid subscription and assign it the Storage Blob Data Contributor role on the Storage account.
The configuration that returns the validation code from the validation event payload in the response body correctly completes the synchronous subscription handshake. Enabling the system-assigned managed identity and granting it the Storage Blob Data Contributor role provides the Event Grid subscription with the necessary write permissions to save dead-lettered events to the storage container.
Step-by-Step Solution
Key Concept
Azure Event Grid webhook endpoint validation and dead-lettering with managed identities.