You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-grid/handler-webhooks.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
---
2
2
title: Webhooks as event handlers for Azure Event Grid events
3
-
description: Describes how you can use webhooks as event handlers for Azure Event Grid events. Azure Automation runbooks and logic apps are supported as event handlers via webhooks.
4
-
ms.topic: conceptual
5
-
ms.date: 01/10/2024
3
+
description: Learn how to use webhooks as event handlers for Azure Event Grid events. Azure Automation runbooks and logic apps are supported as event handlers via webhooks.
4
+
ms.topic: concept-article
5
+
ms.date: 02/12/2025
6
+
# Customer intent: As a developer or architect, I want to learn how to use Webhooks, Logic Apps, and Azure Automation runbooks as events handlers for Azure Event Grid events.
6
7
---
7
8
8
9
# Webhooks, Automation runbooks, Logic Apps as event handlers for Azure Event Grid events
@@ -60,5 +61,5 @@ Use **Logic Apps** to implement business processes to process Event Grid events.
60
61
}
61
62
```
62
63
63
-
## Next steps
64
+
## Related content
64
65
See the [Event handlers](event-handlers.md) article for a list of supported event handlers.
Copy file name to clipboardExpand all lines: articles/event-grid/mqtt-overview.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: 'Overview of MQTT broker in Azure Event Grid'
3
-
description: MQTT broker feature in Azure Event Grid enables MQTT clients to communicate with each other and with Azure services, to support IoT solutions.
3
+
description: Message Queuing Telemetry Transport (MQTT) broker feature in Azure Event Grid enables MQTT clients to communicate with each other and with Azure services.
4
4
ms.topic: concept-article
5
-
ms.date: 01/15/2024
5
+
ms.date: 02/12/2025
6
6
author: george-guirguis
7
7
ms.author: geguirgu
8
8
ms.subservice: mqtt
@@ -30,7 +30,7 @@ The following are a list of key concepts involved in Azure Event Grid’s MQTT b
30
30
31
31
MQTT is a publish-subscribe messaging transport protocol that was designed for constrained environments. It's the goto communication standard for IoT scenarios due to efficiency, scalability, and reliability. MQTT broker enables clients to publish and subscribe to messages over MQTT v3.1.1, MQTT v3.1.1 over WebSockets, MQTT v5, and MQTT v5 over WebSockets protocols. The following list shows some of the feature highlights of MQTT broker:
32
32
- MQTT v5 features:
33
-
- **Last Will and Testament (LWT)** notifies your MQTT clients with the abrupt disconnections of other MQTT clients. You can use LWT to ensure predictable and reliable flow of communication among MQTT clients during unexpected disconnections.
33
+
- **Last Will and Testament** notifies your MQTT clients with the abrupt disconnections of other MQTT clients. You can use this feature to ensure predictable and reliable flow of communication among MQTT clients during unexpected disconnections.
34
34
- **User properties** allow you to add custom key-value pairs in the message header to provide more context about the message. For example, include the purpose or origin of the message so the receiver can handle the message efficiently.
35
35
- **Request-response pattern** enables your clients to take advantage of the standard request-response asynchronous pattern, specifying the response topic and correlation ID in the request for the client to respond without prior configuration.
36
36
- **Message expiry interval** allows you to declare to MQTT broker when to disregard a message that is no longer relevant or valid. For example, disregard stale commands or alerts.
@@ -43,7 +43,7 @@ MQTT is a publish-subscribe messaging transport protocol that was designed for c
43
43
- MQTT broker is adding more MQTT v5 features in the future to align more with the MQTT specifications. The following items detail the current differences between features supported by MQTT broker and the MQTT v5 specifications: Will message, Retain flag, Message ordering, and QoS 2 aren't supported.
44
44
45
45
- MQTT v3.1.1 features:
46
-
- **Last Will and Testament (LWT)** notifies your MQTT clients with the abrupt disconnections of other MQTT clients. You can use LWT to ensure predictable and reliable flow of communication among MQTT clients during unexpected disconnections.
46
+
- **Last Will and Testament** notifies your MQTT clients with the abrupt disconnections of other MQTT clients. You can use this feature to ensure predictable and reliable flow of communication among MQTT clients during unexpected disconnections.
47
47
- **Persistent sessions** ensure reliability by preserving the client's subscription information and messages when a client disconnects.
48
48
- **QoS 0 and 1** provide your clients with control over the efficiency and reliability of the communication.
49
49
- MQTT broker is adding more MQTT v3.1.1 features in the future to align more with the MQTT specifications. The following items detail the current differences between features supported by MQTT broker and the MQTT v3.1.1 specification: Retain flag, Message ordering, and QoS 2 aren't supported.
Copy file name to clipboardExpand all lines: articles/event-grid/receive-events.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,36 @@
1
1
---
2
2
title: Receive events from Azure Event Grid to an HTTP endpoint
3
3
description: Describes how to validate an HTTP endpoint, then receive and deserialize Events from Azure Event Grid.
4
-
ms.topic: conceptual
5
-
ms.date: 01/10/2024
4
+
ms.topic: how-to
5
+
ms.date: 02/12/2025
6
6
ms.devlang: csharp
7
7
# ms.devlang: csharp, javascript
8
8
ms.custom: devx-track-csharp
9
+
# Customer intent: As a developer, I want to learn how to receive events from Azure Event Grid to an HTTP endpoint.
9
10
---
10
11
11
12
# Receive events to an HTTP endpoint
12
13
13
-
This article describes how to [validate an HTTP endpoint](end-point-validation-cloud-events-schema.md) to receive events from an Event Subscription and then receive and deserialize events. This article uses an Azure Function for demonstration purposes, however the same concepts apply regardless of where the application is hosted.
14
+
This article describes how to [validate an HTTP endpoint](end-point-validation-cloud-events-schema.md) to receive events from an Event Subscription and then receive and deserialize events. This article uses an Azure Function for demonstration purposes. However the same concepts apply regardless of where the application is hosted.
14
15
15
16
> [!NOTE]
16
-
> We recommend that you use an [Event Grid Trigger](../azure-functions/functions-bindings-event-grid.md) when triggering an Azure Function with Event Grid. It provides an easier and quicker integration between Event Grid and Azure Functions. However, note that Azure Functions' Event Grid trigger does not support the scenario where the hosted code needs to control the HTTP status code returned to Event Grid. Given this limitation, your code running on an Azure Function would not be able to return a 5XX error to initiate an event delivery retry by Event Grid, for example.
17
+
> We recommend that you use an [Event Grid Trigger](../azure-functions/functions-bindings-event-grid.md) when triggering an Azure Function with Event Grid. It provides an easier and quicker integration between Event Grid and Azure Functions. HoweverAzure Functions' Event Grid trigger doesn't support the scenario where the hosted code needs to control the HTTP status code returned to Event Grid. Given this limitation, your code running on an Azure Function wouldn't be able to return a 5XX error to initiate an event delivery retry by Event Grid, for example.
17
18
18
19
## Prerequisites
19
20
20
-
You need a function app with an HTTP triggered function.
21
+
-You need a function app with an HTTP triggered function.
21
22
22
23
## Add dependencies
23
24
24
25
If you're developing in .NET, [add a dependency](../azure-functions/functions-reference-csharp.md#referencing-custom-assemblies) to your function for the `Azure.Messaging.EventGrid`[NuGet package](https://www.nuget.org/packages/Azure.Messaging.EventGrid).
25
26
26
-
SDKs for other languages are available via the [Publish SDKs](./sdk-overview.md#data-plane-sdks) reference. These packages have the models for native event types such as `EventGridEvent`, `StorageBlobCreatedEventData`, and `EventHubCaptureFileCreatedEventData`.
27
+
SDKs for other languages are available via the [Publishing SDKs](./sdk-overview.md#data-plane-sdks) reference. These packages have the models for native event types such as `EventGridEvent`, `StorageBlobCreatedEventData`, and `EventHubCaptureFileCreatedEventData`.
27
28
28
29
## Endpoint validation
29
30
30
31
The first thing you want to do is handle `Microsoft.EventGrid.SubscriptionValidationEvent` events. Every time someone subscribes to an event, Event Grid sends a validation event to the endpoint with a `validationCode` in the data payload. The endpoint is required to echo this back in the response body to [prove the endpoint is valid and owned by you](end-point-validation-cloud-events-schema.md). If you're using an [Event Grid Trigger](../azure-functions/functions-bindings-event-grid.md) rather than a WebHook triggered Function, endpoint validation is handled for you. If you use a third-party API service (like [Zapier](https://zapier.com/) or [IFTTT](https://ifttt.com/)), you might not be able to programmatically echo the validation code. For those services, you can manually validate the subscription by using a validation URL that is sent in the subscription validation event. Copy that URL in the `validationUrl` property and send a GET request either through a REST client or your web browser.
31
32
32
-
In C#, the `ParseMany()` method is used to deserialize a `BinaryData` instance containing one or more events into an array of `EventGridEvent`. If you knew ahead of time that you are deserializing only a single event, you could use the `Parse` method instead.
33
+
In C#, the `ParseMany()` method is used to deserialize a `BinaryData` instance containing one or more events into an array of `EventGridEvent`. If you knew ahead of time that you're deserializing only a single event, you could use the `Parse` method instead.
33
34
34
35
To programmatically echo the validation code, use the following code.
35
36
@@ -250,7 +251,7 @@ Test the new functionality of the function by putting a [Blob storage event](./e
250
251
251
252
You should see the blob URL output in the function log:
252
253
253
-
```
254
+
```bash
254
255
2022-11-14T22:40:45.978 [Information] Executing 'Function1' (Reason='This function was programmatically called via the host APIs.', Id=8429137d-9245-438c-8206-f9e85ef5dd61)
255
256
2022-11-14T22:40:46.012 [Information] C# HTTP trigger functionprocessed a request.
# Customer intent: As an architect or a developer, I want to learn how to delivering events to a webhook using Microsoft Entra ID.
7
8
---
8
9
9
10
# Deliver events to Microsoft Entra protected endpoints
10
-
This article describes how to use Microsoft Entra ID to secure the connection between your **event subscription** and your **webhook endpoint**. It uses the Azure portal for demonstration, however the feature can also be enabled using CLI, PowerShell, or the SDKs.
11
+
This article describes how to use Microsoft Entra ID to secure the connection between your **event subscription** and your **webhook endpoint**. It uses the Azure portal for demonstration. However the feature can also be enabled using CLI, PowerShell, or the SDKs.
11
12
12
13
> [!IMPORTANT]
13
-
> Additional access check has been introduced as part of create or update of event subscription on March 30, 2021 to address a security vulnerability. The subscriber client's service principal needs to be either an owner or have a role assigned on the destination application service principal. Reconfigure your Microsoft Entra Application following the new instructions below.For an overview of Microsoft Entra applications and service principals, see [Microsoft identity platform (v2.0) overview](/entra/identity-platform/v2-overview).
14
+
> Extra access check was introduced as part of create or update of event subscription on March 30, 2021 to address a security vulnerability. The subscriber client's service principal needs to be either an owner or have a role assigned on the destination application service principal. Reconfigure your Microsoft Entra Application following the new instructions in this article. For an overview of Microsoft Entra applications and service principals, see [Microsoft identity platform (v2.0) overview](/entra/identity-platform/v2-overview).
14
15
15
16
## Scenarios
16
17
This article explains how to implement the following two scenarios in detail:
@@ -63,9 +64,9 @@ This section shows how to configure the event subscription by using a Microsoft
63
64
> [!NOTE]
64
65
> You don't need to modify the value of **$eventGridAppId**. In this script, **AzureEventGridSecureWebhookSubscriber** is set for the **$eventGridRoleName**. Remember, you must be a member of the [Microsoft Entra Application Administrator role](/entra/identity/role-based-access-control/permissions-reference#all-roles) or be an owner of the service principal of webhook app in Microsoft Entra ID to execute this script.
65
66
66
-
If you see the following error message, you need to elevate to the service principal. An extra access check has been introduced as part of create or update of event subscription on March 30, 2021 to address a security vulnerability. The subscriber client's service principal needs to be either an owner or have a role assigned on the destination application service principal.
67
+
If you see the following error message, you need to elevate to the service principal. An extra access check was introduced as part of create or update of event subscription on March 30, 2021 to address a security vulnerability. The subscriber client's service principal needs to be either an owner or have a role assigned on the destination application service principal.
67
68
68
-
```
69
+
```powershell
69
70
New-MgServicePrincipalAppRoleAssignment: Error occurred while executing NewServicePrincipalAppRoleAssignment
70
71
Code: Authorization_RequestDenied
71
72
Message: Insufficient privileges to complete the operation.
@@ -137,7 +138,7 @@ This section shows how to configure the event subscription by using a Microsoft
137
138
10. If everything was correctly configured, you can successfully create the webhook subscription in your Event Grid topic.
138
139
139
140
> [!NOTE]
140
-
> At this point, Event Grid is now passing the Microsoft Entra bearer token to the webhook client in every message. You'll need to validate the authorization token in your webhook.
141
+
> At this point, Event Grid is now passing the Microsoft Entra bearer token to the webhook client in every message. You need to validate the authorization token in your webhook.
@@ -182,17 +183,17 @@ Do the following steps in **Tenant B**:
182
183
> [!NOTE]
183
184
> You don't need to modify the value of **```$eventGridAppId```**. In this script, **AzureEventGridSecureWebhookSubscriber** is set for **```$eventGridRoleName```**. Remember, you must be a member of the [Microsoft Entra Application Administrator role](/entra/identity/role-based-access-control/permissions-reference#all-roles) or be an owner of the service principal of webhook app in Microsoft Entra ID to execute this script.
184
185
185
-
If you see the following error message, you need to elevate to the service principal. An extra access check has been introduced as part of create or update of event subscription on March 30, 2021 to address a security vulnerability. The subscriber client's service principal needs to be either an owner or have a role assigned on the destination application service principal.
186
+
If you see the following error message, you need to elevate to the service principal. An extra access check was introduced as part of create or update of event subscription on March 30, 2021 to address a security vulnerability. The subscriber client's service principal needs to be either an owner or have a role assigned on the destination application service principal.
186
187
187
-
```
188
+
```powershell
188
189
New-MgServicePrincipalAppRoleAssignment: Error occurred while executing NewServicePrincipalAppRoleAssignment
189
190
Code: Authorization_RequestDenied
190
191
Message: Insufficient privileges to complete the operation.
191
192
```
192
193
193
194
### Tenant A
194
195
195
-
Back in **Tenant A**, do the following steps:
196
+
Now,in**Tenant A**, do the following steps:
196
197
197
198
1. Open the [Azure Shell](https://portal.azure.com/#cloudshell/), and sign in as the Event Grid subscription writer Microsoft Entra Application by running the command.
198
199
@@ -206,15 +207,14 @@ Back in **Tenant A**, do the following steps:
206
207
```
207
208
208
209
> [!NOTE]
209
-
> In this scenario we are using an Event Grid System Topic. See [here](/cli/azure/eventgrid), if you want to create a subscription for custom topics or Event Grid domains by using the Azure CLI.
210
+
> In this scenario, we're using an Event Grid System Topic. See [here](/cli/azure/eventgrid), if you want to create a subscription for custom topics or Event Grid domains by using the Azure CLI.
210
211
3. If everything was correctly configured, you can successfully create the webhook subscription in your Event Grid topic.
211
212
212
213
> [!NOTE]
213
-
> At this point, Event Grid is now passing the Microsoft Entra Bearer token to the webhook client in every message. You'll need to validate the Authorization token in your webhook.
214
+
> At this point, Event Grid is now passing the Microsoft Entra Bearer token to the webhook client in every message. You need to validate the Authorization token in your webhook.
214
215
215
-
## Next steps
216
+
## Related content
216
217
217
218
* For conceptual information, see [WebHook event delivery](end-point-validation-cloud-events-schema.md).
218
-
* For information about monitoring event deliveries, see [Monitor Event Grid message delivery](monitor-event-delivery.md).
219
219
* For more information about the authentication key, see [Event Grid security and authentication](security-authentication.md).
220
220
* For more information about creating an Azure Event Grid subscription, see [Event Grid subscription schema](subscription-creation-schema.md).
0 commit comments