Fix small bug in PowerShell script for Azure setup
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
parent
a08a813fe7
commit
d43786283f
|
|
@ -56,7 +56,7 @@ try {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Write-Host "Creating the Azure AD Application role assignment: " $webhookAppId
|
Write-Host "Creating the Azure AD Application role assignment: " $webhookAppId
|
||||||
$eventGridAppRole = $app.AppRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
|
$eventGridAppRole = $appRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
|
||||||
New-MgServicePrincipalAppRoleAssignment -AppRoleId $eventGridAppRole.Id -ResourceId $servicePrincipal.Id -ServicePrincipalId $servicePrincipal.Id -PrincipalId $servicePrincipal.Id -ErrorAction Stop
|
New-MgServicePrincipalAppRoleAssignment -AppRoleId $eventGridAppRole.Id -ResourceId $servicePrincipal.Id -ServicePrincipalId $servicePrincipal.Id -PrincipalId $servicePrincipal.Id -ErrorAction Stop
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
@ -72,7 +72,7 @@ try {
|
||||||
# Creates the service app role assignment for the Event Grid Azure AD Application
|
# Creates the service app role assignment for the Event Grid Azure AD Application
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$eventGridAppRole = $app.AppRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
|
$eventGridAppRole = $appRoles | Where-Object -Property "DisplayName" -eq -Value $eventGridRoleName
|
||||||
New-MgServicePrincipalAppRoleAssignment -AppRoleId $eventGridAppRole.Id -ResourceId $servicePrincipal.Id -ServicePrincipalId $eventGridSP.Id -PrincipalId $eventGridSP.Id -ErrorAction Stop
|
New-MgServicePrincipalAppRoleAssignment -AppRoleId $eventGridAppRole.Id -ResourceId $servicePrincipal.Id -ServicePrincipalId $eventGridSP.Id -PrincipalId $eventGridSP.Id -ErrorAction Stop
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue