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/secure-webhook-delivery.md
+31-25Lines changed: 31 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,60 +111,66 @@ Based on the diagram above, follow the next steps to configure the tenant.
111
111
112
112
## Deliver events to a Webhook in a different Azure AD tenant
113
113
114
-
To enable a secure webhook subscription across multiple tenants you'll need to do this task by using an Azure AD Application, this process isn't currently available by using the Azure AD user from the portal.
114
+
To secure the connection between your event subscription and your webhook endpoint that are in different Azure AD tenants, you'll need to use an Azure AD application as shown in this section. Currently, it's not possible to secure this connection by using an Azure AD user in the Azure portal.
115
115
116
116

117
117
118
-
Based on the diagram above, follow the next steps to configure both tenants.
118
+
Based on the diagram above, follow next steps to configure both tenants.
119
119
120
-
1. Create an Azure AD Application forthe Event Grid subscription writer configured to work with any Azure AD directory (Multitenant)in the **Tenant A**.
120
+
### Tenant A
121
121
122
-
2. Create a secret forthe Azure AD Application previously createdinthe **Tenant A** and save the value (you'll need this value later).
122
+
Do the following steps in**Tenant A**:
123
123
124
-
3. In the **Tenant A**, go to the Access control (IAM) in the Event Grid Topic and add the role assignment of the Azure AD Application of the Event Grid subscription writer as Event Grid Contributor, this step will allow us to have access to the Event Grid resource when we logged-in into Azure with the Azure AD Application by using the Azure CLI.
124
+
1. Create an Azure AD application for the Event Grid subscription writer configured to work with any Azure AD directory (Multitenant).
125
125
126
-
4. Create an Azure AD Application for the webhook configured to work with the Microsoft directory (Single tenant) in the **Tenant B**.
126
+
2. Create a secret forthe Azure AD application previously createdin the **Tenant A**, and save the value (you'll need this value later).
127
127
128
-
5. Open the [Azure Shell](https://portal.azure.com/#cloudshell/) in the **Tenant B** and select the PowerShell environment.
128
+
3. Navigate to the **Access control (IAM)** page for the event grid topic. Add Azure AD application of the Event Grid subscription writer to the **Event Grid Contributor** role. This step allows the application to have access to the Event Grid resource when you log in into Azure with the Azure AD application by using the Azure CLI.
129
129
130
-
6. Modify the **$webhookAadTenantId** value to connect to the **Tenant B**.
130
+
### Tenant B
131
+
132
+
Do the following steps in **Tenant B**:
131
133
134
+
1. Create an Azure AD Application for the webhook configured to work with the Microsoft directory (Single tenant).
135
+
5. Open the [Azure Shell](https://portal.azure.com/#cloudshell/), and select the PowerShell environment.
136
+
6. Modify the **$webhookAadTenantId** value to connect to the **Tenant B**.
132
137
- Variables:
133
138
- **$webhookAadTenantId**: Azure Tenant ID for the **Tenant B**
7. Open the [following script](scripts/event-grid-powershell-webhook-secure-delivery-azure-ad-app.md) and update the values of **$webhookAppObjectId** and **$eventSubscriptionWriterAppId** with your identifiers, then continue to run the script.
7. Open the [following script](scripts/event-grid-powershell-webhook-secure-delivery-azure-ad-app.md), and update values of **$webhookAppObjectId** and **$eventSubscriptionWriterAppId** with your identifiers, then continue to run the script.
141
145
142
146
- Variables:
143
-
- **$webhookAppObjectId**: Azure AD Application ID created for the webhook
144
-
- **$eventSubscriptionWriterAppId**: Azure AD Application ID for Event Grid subscription writer
147
+
- **$webhookAppObjectId**: Azure AD application ID created for the webhook
148
+
- **$eventSubscriptionWriterAppId**: Azure AD application ID for Event Grid subscription writer
145
149
146
-
> [!NOTE]
147
-
> You don't need to modify the value of **```$eventGridAppId```**, for this script we set**AzureEventGridSecureWebhookSubscriber** as the value for the **```$eventGridRoleName```**. Remember, you must be a member of the [Azure AD Application Administrator role](../active-directory/roles/permissions-reference.md#all-roles) to execute this script.
150
+
> [!NOTE]
151
+
> You don't need to modify the value of **```$eventGridAppId```**, for this script we set**AzureEventGridSecureWebhookSubscriber** as the value for the **```$eventGridRoleName```**. Remember, you must be a member of the [Azure AD Application Administrator role](../active-directory/roles/permissions-reference.md#all-roles) to execute this script.
148
152
149
-
8. Open the [Azure Shell](https://portal.azure.com/#cloudshell/) in the **Tenant A** and login as the Event Grid subscription writer Azure AD Application by running the command.
153
+
### Tenant A
154
+
155
+
Back in**Tenant A**, do the following steps:
156
+
157
+
1. Open the [Azure Shell](https://portal.azure.com/#cloudshell/), and login as the Event Grid subscription writer Azure AD Application by running the command.
> 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.
163
-
164
-
10. If everything was correctly configured, you can successfully create the webhook subscription in your Event Grid Topic.
169
+
> 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.
170
+
3. If everything was correctly configured, you can successfully create the webhook subscription in your event grid topic.
165
171
166
172
> [!NOTE]
167
-
> At this point Event Grid is now passing the Azure AD Bearer token to the webhook client in every message, you'll need to validate the Authorization token in your webhook.
173
+
> At this point, Event Grid is now passing the Azure AD Bearer token to the webhook client in every message. You'll need to validate the Authorization token in your webhook.
0 commit comments