Skip to content

Commit f044d6d

Browse files
committed
upload changes
1 parent 9d0f5ab commit f044d6d

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

articles/event-grid/scripts/powershell-webhook-secure-delivery-microsoft-entra-app.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,41 +47,41 @@ try {
4747
return $appRole
4848
}
4949
50-
# Creates Azure Event Grid Azure AD Application if not exists
50+
# Creates Azure Event Grid Microsoft Entra Application if not exists
5151
# You don't need to modify this id
52-
# But Azure Event Grid Azure AD Application Id is different for different clouds
52+
# But Azure Event Grid Entra Application Id is different for different clouds
5353
5454
$eventGridAppId = "4962773b-9cdb-44cf-a8bf-237846a00ab7" # Azure Public Cloud
5555
# $eventGridAppId = "54316b56-3481-47f9-8f30-0300f5542a7b" # Azure Government Cloud
5656
$eventGridRoleName = "AzureEventGridSecureWebhookSubscriber" # You don't need to modify this role name
5757
$eventGridSP = Get-MgServicePrincipal -Filter ("appId eq '" + $eventGridAppId + "'")
5858
if ($eventGridSP -match "Microsoft.EventGrid")
5959
{
60-
Write-Host "The Azure AD Application is already defined.`n"
60+
Write-Host "The Microsoft Entra Application is already defined.`n"
6161
} else {
62-
Write-Host "Creating the Azure Event Grid Azure AD Application"
62+
Write-Host "Creating the Azure Event Grid Microsoft Entra Application"
6363
$eventGridSP = New-MgServicePrincipal -AppId $eventGridAppId
6464
}
6565
66-
# Creates the Azure app role for the webhook Azure AD application
66+
# Creates the Azure app role for the webhook Microsoft Entra application
6767
6868
$app = Get-MgApplication -ObjectId $webhookAppObjectId
6969
$appRoles = $app.AppRoles
7070
71-
Write-Host "Azure AD App roles before addition of the new role..."
71+
Write-Host "Microsoft Entra App roles before addition of the new role..."
7272
Write-Host $appRoles
7373
7474
if ($appRoles -match $eventGridRoleName)
7575
{
7676
Write-Host "The Azure Event Grid role is already defined.`n"
7777
} else {
78-
Write-Host "Creating the Azure Event Grid role in Azure AD Application: " $webhookAppObjectId
78+
Write-Host "Creating the Azure Event Grid role in Microsoft Entra Application: " $webhookAppObjectId
7979
$newRole = CreateAppRole -Name $eventGridRoleName -Description "Azure Event Grid Role"
8080
$appRoles.Add($newRole)
8181
Update-MgApplication -ObjectId $app.ObjectId -AppRoles $appRoles
8282
}
8383
84-
Write-Host "Azure AD App roles after addition of the new role..."
84+
Write-Host "Microsoft Entra App roles after addition of the new role..."
8585
Write-Host $appRoles
8686
8787
# Creates the user role assignment for the app that will create event subscription
@@ -91,21 +91,21 @@ try {
9191
9292
if ($null -eq $eventSubscriptionWriterSP)
9393
{
94-
Write-Host "Create new Azure AD Application"
94+
Write-Host "Create new Microsoft Entra Application"
9595
$eventSubscriptionWriterSP = New-MgServicePrincipal -AppId $eventSubscriptionWriterAppId
9696
}
9797
9898
try
9999
{
100-
Write-Host "Creating the Azure AD Application role assignment: " $eventSubscriptionWriterAppId
100+
Write-Host "Creating the Microsoft Entra Application role assignment: " $eventSubscriptionWriterAppId
101101
$eventGridAppRole = $app.AppRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
102102
New-MgServicePrincipalAppRoleAssignment -Id $eventGridAppRole.Id -ResourceId $servicePrincipal.ObjectId -ObjectId $eventSubscriptionWriterSP.ObjectId -PrincipalId $eventSubscriptionWriterSP.ObjectId
103103
}
104104
catch
105105
{
106106
if( $_.Exception.Message -like '*Permission being assigned already exists on the object*')
107107
{
108-
Write-Host "The Azure AD Application role is already defined.`n"
108+
Write-Host "The Microsoft Entra Application role is already defined.`n"
109109
}
110110
else
111111
{
@@ -114,15 +114,15 @@ try {
114114
Break
115115
}
116116
117-
# Creates the service app role assignment for Event Grid Azure AD Application
117+
# Creates the service app role assignment for Event Grid Microsoft Entra Application
118118
119119
$eventGridAppRole = $app.AppRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
120120
New-MgServicePrincipalAppRoleAssignment -Id $eventGridAppRole.Id -ResourceId $servicePrincipal.ObjectId -ObjectId $eventGridSP.ObjectId -PrincipalId $eventGridSP.ObjectId
121121
122122
# Print output references for backup
123123
124-
Write-Host ">> Webhook's Azure AD Application Id: $($app.AppId)"
125-
Write-Host ">> Webhook's Azure AD Application ObjectId Id: $($app.ObjectId)"
124+
Write-Host ">> Webhook's Microsoft Entra Application Id: $($app.AppId)"
125+
Write-Host ">> Webhook's Microsoft Entra Application ObjectId Id: $($app.ObjectId)"
126126
}
127127
catch {
128128
Write-Host ">> Exception:"
@@ -134,4 +134,4 @@ catch {
134134

135135
## Script explanation
136136

137-
For more details refer to [Secure WebHook delivery with Microsoft Entra ID in Azure Event Grid](../secure-webhook-delivery.md)
137+
For more information, see [Secure WebHook delivery with Microsoft Entra ID in Azure Event Grid](../secure-webhook-delivery.md).

articles/event-grid/scripts/powershell-webhook-secure-delivery-microsoft-entra-user.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Here are the high level steps from the script:
1515

1616
1. Create a service principal for **Microsoft.EventGrid** if it doesn't already exist.
1717
1. Create a role named **AzureEventGridSecureWebhookSubscriber** in the **Microsoft Entra app for your Webhook**.
18-
1. Add service principal of user who will be creating the subscription to the AzureEventGridSecureWebhookSubscriber role.
18+
1. Add service principal of user who is creating the subscription to the AzureEventGridSecureWebhookSubscriber role.
1919
1. Add service principal of Microsoft.EventGrid to the AzureEventGridSecureWebhookSubscriber.
2020

2121
## Sample script - stable
@@ -46,41 +46,41 @@ try {
4646
return $appRole
4747
}
4848
49-
# Creates Azure Event Grid Azure AD Application if not exists
49+
# Creates Azure Event Grid Microsoft Entra Application if not exists
5050
# You don't need to modify this id
51-
# But Azure Event Grid Azure AD Application Id is different for different clouds
51+
# But Azure Event Grid Microsoft Entra Application Id is different for different clouds
5252
5353
$eventGridAppId = "4962773b-9cdb-44cf-a8bf-237846a00ab7" # Azure Public Cloud
5454
# $eventGridAppId = "54316b56-3481-47f9-8f30-0300f5542a7b" # Azure Government Cloud
5555
$eventGridRoleName = "AzureEventGridSecureWebhookSubscriber" # You don't need to modify this role name
5656
$eventGridSP = Get-MgServicePrincipal -Filter ("appId eq '" + $eventGridAppId + "'")
5757
if ($eventGridSP -match "Microsoft.EventGrid")
5858
{
59-
Write-Host "The Azure AD Application is already defined.`n"
59+
Write-Host "The Microsoft Entra Application is already defined.`n"
6060
} else {
61-
Write-Host "Creating the Azure Event Grid Azure AD Application"
61+
Write-Host "Creating the Azure Event Grid Microsoft Entra Application"
6262
$eventGridSP = New-MgServicePrincipal -AppId $eventGridAppId
6363
}
6464
65-
# Creates the Azure app role for the webhook Azure AD application
65+
# Creates the Azure app role for the webhook Microsoft Entra application
6666
6767
$app = Get-MgApplication -ObjectId $webhookAppObjectId
6868
$appRoles = $app.AppRoles
6969
70-
Write-Host "Azure AD App roles before addition of the new role..."
70+
Write-Host "Microsoft Entra App roles before addition of the new role..."
7171
Write-Host $appRoles
7272
7373
if ($appRoles -match $eventGridRoleName)
7474
{
7575
Write-Host "The Azure Event Grid role is already defined.`n"
7676
} else {
77-
Write-Host "Creating the Azure Event Grid role in Azure AD Application: " $webhookAppObjectId
77+
Write-Host "Creating the Azure Event Grid role in Microsoft Entra Application: " $webhookAppObjectId
7878
$newRole = CreateAppRole -Name $eventGridRoleName -Description "Azure Event Grid Role"
7979
$appRoles.Add($newRole)
8080
Update-MgApplication -ObjectId $app.ObjectId -AppRoles $appRoles
8181
}
8282
83-
Write-Host "Azure AD App roles after addition of the new role..."
83+
Write-Host "Microsoft Entra App roles after addition of the new role..."
8484
Write-Host $appRoles
8585
8686
# Creates the user role assignment for the user who will create event subscription
@@ -89,7 +89,7 @@ try {
8989
9090
try
9191
{
92-
Write-Host "Creating the Azure Ad App Role assignment for user: " $eventSubscriptionWriterUserPrincipalName
92+
Write-Host "Creating the Microsoft Entra App Role assignment for user: " $eventSubscriptionWriterUserPrincipalName
9393
$eventSubscriptionWriterUser = Get-MgUser -ObjectId $eventSubscriptionWriterUserPrincipalName
9494
$eventGridAppRole = $app.AppRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
9595
New-MgUserAppRoleAssignment -Id $eventGridAppRole.Id -ResourceId $servicePrincipal.ObjectId -ObjectId $eventSubscriptionWriterUser.ObjectId -PrincipalId $eventSubscriptionWriterUser.ObjectId
@@ -98,7 +98,7 @@ try {
9898
{
9999
if( $_.Exception.Message -like '*Permission being assigned already exists on the object*')
100100
{
101-
Write-Host "The Azure AD User Application role is already defined.`n"
101+
Write-Host "The Microsoft Entra User Application role is already defined.`n"
102102
}
103103
else
104104
{
@@ -107,15 +107,15 @@ try {
107107
Break
108108
}
109109
110-
# Creates the service app role assignment for Event Grid Azure AD Application
110+
# Creates the service app role assignment for Event Grid Microsoft Entra Application
111111
112112
$eventGridAppRole = $app.AppRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
113113
New-MgServicePrincipalAppRoleAssignment -Id $eventGridAppRole.Id -ResourceId $servicePrincipal.ObjectId -ObjectId $eventGridSP.ObjectId -PrincipalId $eventGridSP.ObjectId
114114
115115
# Print output references for backup
116116
117-
Write-Host ">> Webhook's Azure AD Application Id: $($app.AppId)"
118-
Write-Host ">> Webhook's Azure AD Application ObjectId Id: $($app.ObjectId)"
117+
Write-Host ">> Webhook's Microsoft Entra Application Id: $($app.AppId)"
118+
Write-Host ">> Webhook's Microsoft Entra Application ObjectId Id: $($app.ObjectId)"
119119
}
120120
catch {
121121
Write-Host ">> Exception:"
@@ -127,4 +127,4 @@ catch {
127127

128128
## Script explanation
129129

130-
For more details refer to [Secure WebHook delivery with Microsoft Entra ID in Azure Event Grid](../secure-webhook-delivery.md)
130+
For more information, see [Secure WebHook delivery with Microsoft Entra ID in Azure Event Grid](../secure-webhook-delivery.md).

articles/event-grid/secure-webhook-delivery.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ There are two subsections in this section. Read through both the scenarios or th
4040

4141
This section shows how to configure the event subscription by using a Microsoft Entra user.
4242

43-
1. Create a Microsoft Entra application for the webhook configured to work with the Microsoft directory (single tenant).
43+
1. Create a Microsoft Entra application for the webhook configured to work with the Microsoft Entra (single tenant).
4444

4545
2. Open the [Azure Shell](https://portal.azure.com/#cloudshell/) in the tenant and select the PowerShell environment.
4646

@@ -90,13 +90,13 @@ This section shows how to configure the event subscription by using a Microsoft
9090
9191
This section shows how to configure the event subscription by using a Microsoft Entra application.
9292
93-
1. Create a Microsoft Entra application for the Event Grid subscription writer configured to work with the Microsoft directory (Single tenant).
93+
1. Create a Microsoft Entra application for the Event Grid subscription writer configured to work with the Microsoft Entra (Single tenant).
9494
9595
2. Create a secret for the Microsoft Entra application and save the value (you need this value later).
9696
9797
3. Go to the **Access control (IAM)** page for the Event Grid topic and assign **Event Grid Contributor** role to the Event Grid subscription writer app. This step allows you to have access to the Event Grid resource when you logged-in into Azure with the Microsoft Entra application by using Azure CLI.
9898
99-
4. Create a Microsoft Entra application for the webhook configured to work with the Microsoft directory (Single tenant).
99+
4. Create a Microsoft Entra application for the webhook configured to work with the Microsoft Entra (Single tenant).
100100
101101
5. Open the [Azure Shell](https://portal.azure.com/#cloudshell/) in the tenant and select the PowerShell environment.
102102
@@ -153,7 +153,7 @@ Based on the diagram, follow next steps to configure both tenants.
153153
154154
Do the following steps in **Tenant A**:
155155
156-
1. Create a Microsoft Entra application for the Event Grid subscription writer configured to work with any Microsoft Entra directory (multitenant).
156+
1. Create a Microsoft Entra application for the Event Grid subscription writer configured to work with any Microsoft Entra (multitenant).
157157
158158
2. Create a secret for the Microsoft Entra application, and save the value (you need this value later).
159159
@@ -163,7 +163,7 @@ Do the following steps in **Tenant A**:
163163
164164
Do the following steps in **Tenant B**:
165165
166-
1. Create a Microsoft Entra Application for the webhook configured to work with the Microsoft directory (single tenant).
166+
1. Create a Microsoft Entra Application for the webhook configured to work with the Microsoft Entra (single tenant).
167167
5. Open the [Azure Shell](https://portal.azure.com/#cloudshell/), and select the PowerShell environment.
168168
6. Modify the **$webhookAadTenantId** value to connect to the **Tenant B**.
169169
- Variables:

0 commit comments

Comments
 (0)