Skip to content

Commit fd53076

Browse files
authored
Merge pull request #116082 from spelluru/egridsas0521
reorg and cleanup as per Kishore
2 parents 201bbd4 + 2e02e38 commit fd53076

File tree

1 file changed

+21
-31
lines changed

1 file changed

+21
-31
lines changed

articles/event-grid/troubleshoot-subscription-validation.md

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,22 @@ author: spelluru
66

77
ms.service: event-grid
88
ms.topic: conceptual
9-
ms.date: 04/30/2020
9+
ms.date: 05/21/2020
1010
ms.author: spelluru
1111
---
1212

13-
# Troubleshoot Azure Event Grid errors
14-
This troubleshooting guide provides you information on troubleshooting event subscription validations.
15-
16-
17-
## Troubleshoot event subscription validation
18-
19-
During event subscription creation, if you're seeing an error message such as `The attempt to validate the provided endpoint https://your-endpoint-here failed. For more details, visit https://aka.ms/esvalidation`, it indicates that there's a failure in the validation handshake. To resolve this error, verify the following aspects:
20-
21-
- Do an HTTP POST to your webhook url with a [sample SubscriptionValidationEvent](webhook-event-delivery.md#validation-details) request body using Postman or curl or similar tool.
22-
- If your webhook is implementing synchronous validation handshake mechanism, verify that the ValidationCode is returned as part of the response.
23-
- If your webhook is implementing asynchronous validation handshake mechanism, verify that you are the HTTP POST is returning 200 OK.
24-
- If your webhook is returning 403 (Forbidden) in the response, check if your webhook is behind an Azure Application Gateway or Web Application Firewall. If it is, then your need to disable these firewall rules and do an HTTP POST again:
25-
26-
920300 (Request Missing an Accept Header, we can fix this)
27-
28-
942430 (Restricted SQL Character Anomaly Detection (args): # of special characters exceeded (12))
29-
30-
920230 (Multiple URL Encoding Detected)
31-
32-
942130 (SQL Injection Attack: SQL Tautology Detected.)
33-
34-
931130 (Possible Remote File Inclusion (RFI) Attack = Off-Domain Reference/Link)
13+
# Troubleshoot Azure Event Grid subscription validations
14+
This article provides you information on troubleshooting event subscription validations.
3515

3616
> [!IMPORTANT]
3717
> For detailed information on endpoint validation for webhooks, see [Webhook event delivery](webhook-event-delivery.md).
3818
39-
## Validate event grid event subscription using Postman
19+
## Validate Event Grid event subscription using Postman
4020
Here's an example of using Postman for validating a webhook subscription of an Event Grid event:
4121

4222
![Event grid event subscription validation using Postman](./media/troubleshoot-subscription-validation/event-subscription-validation-postman.png)
4323

44-
Here is a sample SubscriptionValidationEvent JSON:
24+
Here is a sample **SubscriptionValidationEvent** JSON:
4525

4626
```json
4727
[
@@ -68,7 +48,15 @@ Here is the sample successful response:
6848
}
6949
```
7050

71-
To learn more about event grid event validation for webhooks, see [Endpoint validation with event grid events](webhook-event-delivery.md#endpoint-validation-with-event-grid-events).
51+
To learn more about Event Grid event validation for webhooks, see [Endpoint validation with event grid events](webhook-event-delivery.md#endpoint-validation-with-event-grid-events).
52+
53+
54+
## Validate Event Grid event subscription using Curl
55+
Here's the sample Curl command for validating a webhook subscription of an Event Grid event:
56+
57+
```bash
58+
curl -X POST -d '[{"id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66","topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","subject": "","data": {"validationCode": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6"},"eventType": "Microsoft.EventGrid.SubscriptionValidationEvent","eventTime": "2018-01-25T22:12:19.4556811Z", "metadataVersion": "1","dataVersion": "1"}]' -H 'Content-Type: application/json' https://{your-webhook-url.com}
59+
```
7260

7361
## Validate cloud event subscription using Postman
7462
Here's an example of using Postman for validating a webhook subscription of a cloud event:
@@ -77,12 +65,14 @@ Here's an example of using Postman for validating a webhook subscription of a cl
7765

7866
Use the **HTTP OPTIONS** method for validation with cloud events. To learn more about cloud event validation for webhooks, see [Endpoint validation with cloud events](webhook-event-delivery.md#endpoint-validation-with-event-grid-events).
7967

80-
## Event grid event subscription validation using Curl
81-
Here's the sample Curl command for validating a webhook subscription of an Event Grid event:
68+
## Error code: 403
69+
If your webhook is returning 403 (Forbidden) in the response, check if your webhook is behind an Azure Application Gateway or Web Application Firewall. If it's, you need to disable the following firewall rules and do an HTTP POST again:
8270

83-
```bash
84-
curl -X POST -d '[{"id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66","topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","subject": "","data": {"validationCode": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6"},"eventType": "Microsoft.EventGrid.SubscriptionValidationEvent","eventTime": "2018-01-25T22:12:19.4556811Z", "metadataVersion": "1","dataVersion": "1"}]' -H 'Content-Type: application/json' https://{your-webhook-url.com}
85-
```
71+
- 920300 (Request Missing an Accept Header, we can fix this)
72+
- 942430 (Restricted SQL Character Anomaly Detection (args): # of special characters exceeded (12))
73+
- 920230 (Multiple URL Encoding Detected)
74+
- 942130 (SQL Injection Attack: SQL Tautology Detected.)
75+
- 931130 (Possible Remote File Inclusion (RFI) Attack = Off-Domain Reference/Link)
8676

8777
## Next steps
8878
If you need more help, post your issue in the [Stack Overflow forum](https://stackoverflow.com/questions/tagged/azure-eventgrid) or open a [support ticket](https://azure.microsoft.com/support/options/).

0 commit comments

Comments
 (0)