You are developing an integration solution that uses Azure Event Grid to route custom events to a Webhook endpoint. To secure the webhook, you must implement Microsoft Entra ID authentication so that the Webhook only accepts authorized requests from Event Grid. You need to configure the authentication and the subscription.
Which sequence of steps should you perform to complete the configuration?
- 1Register a new application in Microsoft Entra ID to represent the webhook endpoint.
- 2Define an application role within the registered webhook application.
- 3Grant the Azure Event Grid Service Principal the defined application role on the webhook application.
- 4Create the Event Grid subscription, specifying the webhook endpoint and configuring the Microsoft Entra ID authentication details.
Answer
The correct sequence of steps is: Register a new application in Microsoft Entra ID to represent the webhook endpoint, define an application role within the registered webhook application, grant the Azure Event Grid Service Principal the defined application role on the webhook application, and finally create the Event Grid subscription, specifying the webhook endpoint and configuring the Microsoft Entra ID authentication details.
To secure an Event Grid Webhook using Microsoft Entra ID, you must register the Webhook application first to establish its identity. Next, you define an application role inside the registration. You then grant the Azure Event Grid Service Principal this role. Finally, you create the subscription using the Webhook's Entra ID application details. This order ensures that the validation handshake succeeds because Event Grid is already authorized to call the endpoint.
Step-by-Step Solution
Key Concept
Microsoft Entra ID secured webhook endpoints in Azure Event Grid