File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,10 @@ try {
463463 # service principal without permissions to grant RBAC roles to other service principals. That should not be
464464 # considered a critical failure, as the test application may have subscription-level permissions and not require
465465 # the explicit grant.
466- if (! $resourceGroupRoleAssigned ) {
466+ #
467+ # Ignore this check if $AzureTestPrincipal is specified as role assignment will already have been attempted on a
468+ # previous run, and these error messages can be misleading for local runs.
469+ if (! $resourceGroupRoleAssigned -and ! $AzureTestPrincipal ) {
467470 Log " Attempting to assigning the 'Owner' role for '$ResourceGroupName ' to the Test Application '$TestApplicationId '"
468471 $principalOwnerAssignment = New-AzRoleAssignment - RoleDefinitionName " Owner" - ApplicationId " $TestApplicationId " - ResourceGroupName " $ResourceGroupName " - ErrorAction SilentlyContinue
469472
You can’t perform that action at this time.
0 commit comments