File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -655,7 +655,7 @@ New-AzResourceGroup -Name $resourceGroup -Location $location
655
655
``` powershell
656
656
$suffix=Get-Random # random suffix for the Service Principal
657
657
$spDisplayName="sp-$resourceGroup-$suffix"
658
- $azureADAppSp = New-AzADServicePrincipal -DisplayName $displayName -Role Contributor
658
+ $azureADAppSp = New-AzADServicePrincipal -DisplayName $spDisplayName -Role Contributor
659
659
660
660
New-AzRoleAssignment -ObjectId $azureADAppSp.Id -RoleDefinitionName 'User Access Administrator' -ResourceGroupName $resourceGroup -ObjectType 'ServicePrincipal'
661
661
New-AzRoleAssignment -ObJectId $azureADAppSp.Id -RoleDefinitionName 'Contributor' -ResourceGroupName $resourceGroup -ObjectType 'ServicePrincipal'
You can’t perform that action at this time.
0 commit comments