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/communication-services/quickstarts/events/includes/create-event-subscription-net.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
author: pgrandhi
3
3
ms.service: azure-communication-services
4
4
ms.topic: include
5
-
ms.date: 01/28/2024
5
+
ms.date: 06/28/2025
6
6
ms.author: pgrandhi
7
7
---
8
8
@@ -23,6 +23,7 @@ First, install the Microsoft Azure Event Grid Management library for .NET with [
23
23
```csharp
24
24
dotnetaddpackageAzure.ResourceManager.EventGrid;
25
25
```
26
+
26
27
Include the Event Grid Management SDK in your C# project:
27
28
28
29
```csharp
@@ -33,8 +34,11 @@ using Microsoft.Azure.Management.EventGrid.Models;
33
34
## Authenticate with Azure Identity library
34
35
35
36
1. Create a Microsoft Entra application and Service Principal and set up a client secret or trusted certificate issued by certificate authority. Follow the instructions at [Register a Microsoft Entra app and create a service principal](/entra/identity-platform/howto-create-service-principal-portal).
37
+
36
38
1. Store the secret or the certificate in the Azure Keyvault.
39
+
37
40
1. Give contributor or owner access to the subscription to that application following the instructions at [Grant a user access to Azure resources using the Azure portal](/azure/role-based-access-control/quickstart-assign-role-user-portal).
41
+
38
42
1. Read more about [Authorizing access to Event Grid resources](/azure/event-grid/security-authorization).
39
43
40
44
The Azure Identity library provides Microsoft Entra ID token authentication support across the Azure SDK. It provides a set of TokenCredential implementations, which you can use to construct Azure SDK clients that support Microsoft Entra token authentication. For more information, see [Azure Identity client library for .NET](/dotnet/api/overview/azure/identity-readme).
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/events/includes/create-event-subscription-powershell.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
@@ -3,7 +3,7 @@ author: pgrandhi
3
3
ms.service: azure-communication-services
4
4
ms.custom: devx-track-azurepowershell
5
5
ms.topic: include
6
-
ms.date: 01/27/2024
6
+
ms.date: 06/28/2025
7
7
ms.author: pgrandhi
8
8
---
9
9
@@ -24,18 +24,19 @@ First, install the Azure Communication Services module ```Az.EventGrid``` using
24
24
```PowerShell
25
25
PS C:\> Install-Module Az.EventGrid
26
26
```
27
+
27
28
1. Sign in to your Azure subscription with the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) command and follow the on-screen directions.
28
29
29
-
```PowerShell
30
-
Connect-AzAccount
31
-
```
30
+
```PowerShell
31
+
Connect-AzAccount
32
+
```
32
33
33
34
2. If your identity is associated with more than one subscription, then set your active subscription to **subscription of the Web PubSub** resource that you want to move.
To create an event subscription using the [Azure PowerShell](/powershell/azure/get-started-azureps), use the [`New-AzEventGridSubscription`](/powershell/module/az.eventgrid/new-azeventgridsubscription) command.
41
42
@@ -86,4 +87,4 @@ Get-AzResource
86
87
87
88
## Next steps
88
89
89
-
- For information on other commands, see [Az.EventGrid PowerShell Module](/powershell/module/az.eventgrid/new-azeventgridsubscription).
90
+
- For information about other commands, see [Az.EventGrid PowerShell Module](/powershell/module/az.eventgrid/new-azeventgridsubscription).
Get started with Azure Communication Services by using Azure Event Grid to handle Communication Services voice and video calling events.
20
+
You can use Azure Event Grid to handle Communication Services voice and video calling events.
19
21
20
22
## About Azure Event Grid
21
23
22
-
[Azure Event Grid](../../../event-grid/overview.md) is a cloud-based eventing service. In this article, you'll learn how to subscribe to events for [communication service events](../../../event-grid/event-schema-communication-services.md), and trigger an event to view the result. Typically, you send events to an endpoint that processes the event data and takes actions. In this article, we'll send the events to a web app that collects and displays the messages.
24
+
[Azure Event Grid](../../../event-grid/overview.md) is a cloud-based eventing service. This article describes how to subscribe to events for [communication service events](../../../event-grid/event-schema-communication-services.md), and trigger an event to view the result. Typically, you send events to an endpoint that processes the event data and takes actions. In this article, we send the events to a web app that collects and displays the messages.
23
25
24
26
## Prerequisites
27
+
25
28
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
26
-
- An Azure Communication Service resource. Further details can be found in the [Create an Azure Communication Services resource](../create-communication-resource.md) quickstart.
29
+
- An Azure Communication Service resource. For more information, see [Create an Azure Communication Services resource](../create-communication-resource.md).
27
30
- An Azure Communication Services voice and video calling enabled client. [Add voice calling to your app](../voice-video-calling/getting-started-with-calling.md).
28
31
29
-
## Setting up
32
+
## Set up
30
33
31
34
### Enable Event Grid resource provider
32
35
33
-
If you haven't previously used Event Grid in your Azure subscription, you may need to register the Event Grid resource provider following the steps below:
36
+
If you're new to Event Grid, you might need to register the Event Grid resource provider following these steps:
34
37
35
38
In the Azure portal:
36
39
@@ -40,11 +43,11 @@ In the Azure portal:
40
43
4. Find **Microsoft.EventGrid**.
41
44
5. If not registered, select **Register**.
42
45
43
-
It may take a moment for the registration to finish. Select **Refresh** to update the status. When **Status** is **Registered**, you're ready to continue.
46
+
It might take a moment for the registration to finish. Select **Refresh** to update the status. When **Status** is **Registered**, you're ready to continue.
44
47
45
48
### Event Grid Viewer deployment
46
49
47
-
For this quickstart, we will use the [Azure Event Grid Viewer Sample](/samples/azure-samples/azure-event-grid-viewer/azure-event-grid-viewer/) to view events in near-real time. This will provide the user with the experience of a real-time feed. In addition, the payload of each event should be available for inspection as well.
50
+
In this article, we use the [Azure Event Grid Viewer Sample](/samples/azure-samples/azure-event-grid-viewer/azure-event-grid-viewer/) to view events in near-real time. This provides the user with the experience of a real-time feed. In addition, the payload of each event should be available for inspection as well.
48
51
49
52
## Subscribe to voice and video calling events using web hooks
50
53
@@ -56,7 +59,7 @@ Press **Add Event Subscription** to enter the creation wizard.
56
59
57
60
On the **Create Event Subscription** page, Enter a **name** for the event subscription.
58
61
59
-
You can subscribe to specific events, to tell Event Grid which of the voice and video events you want to subscribe to, and where to send the events. Select the events you'd like to subscribe to from the dropdown menu. For voice and video calling you'll have the option to choose `Call Started`, `Call Ended`, `Call Participant added` and`Call Participant Removed`.
62
+
You can subscribe to specific events, to tell Event Grid which of the voice and video events you want to subscribe to, and where to send the events. Select the events you want to subscribe to from the dropdown menu. For voice and video calling, you can choose `Call Started`, `Call Ended`, `Call Participant added`, or`Call Participant Removed`.
60
63
61
64
If you're prompted to provide a **System Topic Name**, feel free to provide a unique string. This field has no impact on your experience and is used for internal telemetry purposes.
62
65
@@ -70,37 +73,36 @@ Select **Web Hook** for **Endpoint type**.
70
73
71
74
For **Endpoint**, click **Select an endpoint**, and enter the URL of your web app.
72
75
73
-
In this case, we will use the URL from the [Azure Event Grid Viewer Sample](/samples/azure-samples/azure-event-grid-viewer/azure-event-grid-viewer/) we set up earlier in the quickstart. The URL for the sample will be in the format: `https://{{site-name}}.azurewebsites.net/api/updates`
76
+
In this case, we use the URL from the [Azure Event Grid Viewer Sample](/samples/azure-samples/azure-event-grid-viewer/azure-event-grid-viewer/) we set up earlier in the quickstart. The URL for the sample uses the format: `https://{{site-name}}.azurewebsites.net/api/updates`
74
77
75
78
Then select **Confirm Selection**.
76
79
77
80
:::image type="content" source="./../sms/media/handle-sms-events/select-events-create-selectwebhook-epadd.png" alt-text="Screenshot showing confirming a Web Hook Endpoint.":::
78
81
79
-
## Viewing voice and video calling events
82
+
## View voice and video calling events
80
83
81
-
### Triggering voice and video calling events
84
+
### Trigger voice and video calling events
82
85
83
86
To view event triggers, we must first generate the events.
84
87
85
-
-`Call Started` events are generated when a Azure Communication Services voice and video call is started. To trigger this event, just start a call attached to your Communication Services resource.
86
-
-`Call Ended` events are generated when a Azure Communication Services voice and video call is ended. To trigger this event, just end a call attached to your Communication Services resource.
88
+
-`Call Started` events are generated when an Azure Communication Services voice and video call is started. To trigger this event, just start a call attached to your Communication Services resource.
89
+
-`Call Ended` events are generated when an Azure Communication Services voice and video call is ended. To trigger this event, just end a call attached to your Communication Services resource.
87
90
-`Call Participant Added` events are generated when a participant is added to an Azure Communication Services voice and video call. To trigger this event, add a participant to an Azure Communication Services voice and video call attached to your Communication Services resource.
88
91
-`Call Participant Removed` events are generated when a participant is removed from an Azure Communication Services voice and video call. To trigger this event, remove a participant from an Azure Communication Services voice and video call attached to your Communication Services resource.
89
92
90
93
Check out the full list of [events supported by Azure Communication Services](../../../event-grid/event-schema-communication-services.md).
91
94
92
-
### Receiving voice and video calling events
95
+
### Receive voice and video calling events
93
96
94
-
Once you complete either action above you will notice that voice and video calling events are sent to your endpoint. These events will show up in the [Azure Event Grid Viewer Sample](/samples/azure-samples/azure-event-grid-viewer/azure-event-grid-viewer/) we set up at the beginning. You can press the eye icon next to the event to see the entire payload.
97
+
Once you complete either action of the previous actions, you notice voice and video calling events are sent to your endpoint. These events show up in the [Azure Event Grid Viewer Sample](/samples/azure-samples/azure-event-grid-viewer/azure-event-grid-viewer/) we set up at the beginning. You can press the eye icon next to the event to see the entire payload.
95
98
96
99
Learn more about the [event schemas and other eventing concepts](../../../event-grid/event-schema-communication-services.md).
97
100
98
101
## Clean up resources
99
102
100
103
If you want to clean up and remove a Communication Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. Learn more about [cleaning up resources](../create-communication-resource.md#clean-up-resources).
101
104
105
+
## Related articles
102
106
103
-
You may also want to:
104
-
105
-
-[Learn about event handling concepts](../../../event-grid/event-schema-communication-services.md)
106
-
-[Learn about Event Grid](../../../event-grid/overview.md)
107
+
-[Learn about event handling concepts](../../../event-grid/event-schema-communication-services.md)
108
+
-[Learn about Event Grid](../../../event-grid/overview.md)
0 commit comments