You are developing a custom ASP.NET Core Web API that will consume events from an Azure Event Grid system topic. When you attempt to create the Event Grid subscription with the Web API endpoint as the Webhook destination, the subscription creation fails. You determine that the Web API endpoint is not correctly responding to the subscription validation request sent by Event Grid.
Which response must the Web API endpoint return to Event Grid to successfully complete the synchronous subscription validation handshake?
- An HTTP 200 OK response containing a JSON object in the body with a property named validationResponse set to the value of validationCode found in the request event data.Cevap
- BAn HTTP 200 OK response containing a JSON object in the body with a property named validationCode set to the value of validationResponse found in the request event data.
- CAn HTTP 202 Accepted response containing a SAS token in the authorization header that grants the event subscription access to the Web API endpoint.
- DAn HTTP 200 OK response containing a JSON object in the body with a client secret retrieved from Azure Key Vault to authenticate the subscription's system-assigned managed identity.
Cevap
An HTTP 200 OK response containing a JSON object in the body with a property named validationResponse set to the value of validationCode found in the request event data.
For synchronous endpoint validation, Azure Event Grid sends a subscription validation event to the configured Webhook endpoint. The endpoint must respond with an HTTP status code 200 OK and a JSON body containing a property named validationResponse set to the value of validationCode that was sent in the request payload.
Adım Adım Çözüm
Anahtar Kavram
Azure Event Grid Webhook endpoint validation handshake requires echoing the validationCode using the validationResponse key in an HTTP 200 OK response.
Tahmini Süre:1m 30s