Skip to content

Commit 9b9b9ad

Browse files
authored
Merge pull request #261079 from spelluru/egridfresh1212
Freshness review of managed identity for Event Grid
2 parents 1cf9e81 + f370254 commit 9b9b9ad

4 files changed

Lines changed: 16 additions & 18 deletions

File tree

articles/event-grid/managed-service-identity.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
title: Event delivery, managed service identity, and private link
3-
description: This article describes how to enable managed service identity for an Azure event grid topic. Use it to forward events to supported destinations.
3+
description: This article describes how to enable managed service identity for an Azure Event Grid topic. Use it to forward events to supported destinations.
44
ms.topic: how-to
55
ms.custom: devx-track-azurecli
6-
ms.date: 03/25/2021
6+
ms.date: 12/12/2023
77
---
88

99
# Event delivery with a managed identity
10-
This article describes how to use a [managed service identity](/entra/identity/managed-identities-azure-resources/overview) for an Azure event grid system topic, custom topic, or domain. Use it to forward events to supported destinations such as Service Bus queues and topics, event hubs, and storage accounts.
11-
10+
This article describes how to use a [managed service identity](/entra/identity/managed-identities-azure-resources/overview) for an Azure Event Grid system topic, custom topic, or domain. Use it to forward events to supported destinations such as Service Bus queues and topics, event hubs, and storage accounts.
1211

1312

1413
## Prerequisites
@@ -21,27 +20,26 @@ This article describes how to use a [managed service identity](/entra/identity/m
2120
> Currently, it's not possible to deliver events using [private endpoints](../private-link/private-endpoint-overview.md). For more information, see the [Private endpoints](#private-endpoints) section at the end of this article.
2221
2322
## Create event subscriptions that use an identity
24-
After you have an event grid custom topic or system topic or domain with a system-managed identity and have added the identity to the appropriate role on the destination, you're ready to create subscriptions that use the identity.
23+
After you have an Event Grid custom topic or system topic or domain with a managed identity and have added the identity to the appropriate role on the destination, you're ready to create subscriptions that use the identity.
2524

2625
### Use the Azure portal
2726
When you create an event subscription, you see an option to enable the use of a system-assigned identity or user-assigned identity for an endpoint in the **ENDPOINT DETAILS** section.
2827

2928
Here's an example of enabling system-assigned identity while creating an event subscription with a Service Bus queue as a destination.
3029

31-
![Enable identity while creating an event subscription for a Service Bus queue](./media/managed-service-identity/service-bus-queue-subscription-identity.png)
30+
:::image type="content" source="./media/managed-service-identity/service-bus-queue-subscription-identity.png" alt-text="Screenshot that shows how to enable an identity when creating an event subscription for a Service Bus queue.":::
3231

3332
You can also enable using a system-assigned identity to be used for dead-lettering on the **Additional Features** tab.
3433

35-
![Enable system-assigned identity for dead-lettering](./media/managed-service-identity/enable-deadletter-identity.png)
36-
37-
You can also enable a managed identity on an event subscription after it's created. On the **Event Subscription** page for the event subscription, switch to the **Additional Features** tab to see the option.
34+
![Screenshot that shows how to enable a system-assigned identity for dead-lettering.](./media/managed-service-identity/enable-deadletter-identity.png)
3835

39-
![Enable system-assigned identity on an existing event subscription](./media/managed-service-identity/event-subscription-additional-features.png)
36+
You can enable a managed identity on an event subscription after it's created. On the **Event Subscription** page for the event subscription, switch to the **Additional Features** tab to see the option. You can also enable identity for dead-lettering on this page.
4037

41-
If you had enabled user-assigned identities for the topic, you will see user-assigned identity option enabled in the drop-down list for **Manged Identity Type**. If you select **User Assigned** for **Managed Identity Type**, you can then select the user-assigned identity that you want to use to deliver events.
38+
:::image type="content" source="./media/managed-service-identity/event-subscription-additional-features.png" alt-text="Screenshot that shows how to enable a system-assigned identity on an existing event subscription.":::
4239

43-
![Enable user-assigned identity on an event subscription](./media/managed-service-identity/event-subscription-user-identity.png)
40+
If you had enabled user-assigned identities for the topic, you'll see user-assigned identity option enabled in the drop-down list for **Manged Identity Type**. If you select **User Assigned** for **Managed Identity Type**, you can then select the user-assigned identity that you want to use to deliver events.
4441

42+
:::image type="content" source="./media/managed-service-identity/event-subscription-user-identity.png" alt-text="Screenshot that shows how to enable a user-assigned identity on an event subscription.":::
4543

4644
### Use the Azure CLI - Service Bus queue
4745
In this section, you learn how to use the Azure CLI to enable the use of a system-assigned identity to deliver events to a Service Bus queue. The identity must be a member of the **Azure Service Bus Data Sender** role. It must also be a member of the **Storage Blob Data Contributor** role on the storage account that's used for dead-lettering.
@@ -60,7 +58,7 @@ sb_esname = "<Specify a name for the event subscription>"
6058
```
6159

6260
#### Create an event subscription by using a managed identity for delivery
63-
This sample command creates an event subscription for an event grid custom topic with an endpoint type set to **Service Bus queue**.
61+
This sample command creates an event subscription for an Event Grid custom topic with an endpoint type set to **Service Bus queue**.
6462

6563
```azurecli-interactive
6664
az eventgrid event-subscription create
@@ -72,7 +70,7 @@ az eventgrid event-subscription create
7270
```
7371

7472
#### Create an event subscription by using a managed identity for delivery and dead-lettering
75-
This sample command creates an event subscription for an event grid custom topic with an endpoint type set to **Service Bus queue**. It also specifies that the system-managed identity is to be used for dead-lettering.
73+
This sample command creates an event subscription for an Event Grid custom topic with an endpoint type set to **Service Bus queue**. It also specifies that the system-managed identity is to be used for dead-lettering.
7674

7775
```azurecli-interactive
7876
storageid=$(az storage account show --name demoStorage --resource-group gridResourceGroup --query id --output tsv)
@@ -102,7 +100,7 @@ eh_esname = "<SPECIFY EVENT SUBSCRIPTION NAME>"
102100
```
103101

104102
#### Create an event subscription by using a managed identity for delivery
105-
This sample command creates an event subscription for an event grid custom topic with an endpoint type set to **Event Hubs**.
103+
This sample command creates an event subscription for an Event Grid custom topic with an endpoint type set to **Event Hubs**.
106104

107105
```azurecli-interactive
108106
az eventgrid event-subscription create
@@ -114,7 +112,7 @@ az eventgrid event-subscription create
114112
```
115113

116114
#### Create an event subscription by using a managed identity for delivery + deadletter
117-
This sample command creates an event subscription for an event grid custom topic with an endpoint type set to **Event Hubs**. It also specifies that the system-managed identity is to be used for dead-lettering.
115+
This sample command creates an event subscription for an Event Grid custom topic with an endpoint type set to **Event Hubs**. It also specifies that the system-managed identity is to be used for dead-lettering.
118116

119117
```azurecli-interactive
120118
storageid=$(az storage account show --name demoStorage --resource-group gridResourceGroup --query id --output tsv)
@@ -177,9 +175,9 @@ az eventgrid event-subscription create
177175
```
178176

179177
## Private endpoints
180-
Currently, it's not possible to deliver events using [private endpoints](../private-link/private-endpoint-overview.md). That is, there is no support if you have strict network isolation requirements where your delivered events traffic must not leave the private IP space.
178+
Currently, it's not possible to deliver events using [private endpoints](../private-link/private-endpoint-overview.md). That is, there's no support if you have strict network isolation requirements where your delivered events traffic must not leave the private IP space.
181179

182-
However, if your requirements call for a secure way to send events using an encrypted channel and a known identity of the sender (in this case, Event Grid) using public IP space, you could deliver events to Event Hubs, Service Bus, or Azure Storage service using an Azure event grid custom topic or a domain with system-managed identity configured as shown in this article. Then, you can use a private link configured in Azure Functions or your webhook deployed on your virtual network to pull events. See the tutorial: [Connect to private endpoints with Azure Functions](../azure-functions/functions-create-vnet.md).
180+
However, if your requirements call for a secure way to send events using an encrypted channel and a known identity of the sender (in this case, Event Grid) using public IP space, you could deliver events to Event Hubs, Service Bus, or Azure Storage service using an Azure Event Grid custom topic or a domain with a managed identity as shown in this article. Then, you can use a private link configured in Azure Functions or your webhook deployed on your virtual network to pull events. See the tutorial: [Connect to private endpoints with Azure Functions](../azure-functions/functions-create-vnet.md).
183181

184182
Under this configuration, the traffic goes over the public IP/internet from Event Grid to Event Hubs, Service Bus, or Azure Storage, but the channel can be encrypted and a managed identity of Event Grid is used. If you configure your Azure Functions or webhook deployed to your virtual network to use an Event Hubs, Service Bus, or Azure Storage via private link, that section of the traffic will evidently stay within Azure.
185183

16.5 KB
Loading
4.14 KB
Loading
1.47 KB
Loading

0 commit comments

Comments
 (0)