File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,9 @@ Grant-SubscriptionCreatorRole -servicePrincipalObjectId "bd42568a-7dd8-489b-bbbb
132132 " principalTenantId" = $tenantId
133133 }
134134 }
135- $roleAssignmentPayloadJson = $roleAssignmentHashTable | ConvertTo-Json - Depth 100 - Compress
136- $roleAssignmentPayloadJson = $roleAssignmentPayloadJson -replace ' "' , ' \"'
135+ $roleAssignmentPayloadJson = $roleAssignmentHashTable | ConvertTo-Json - Depth 100
137136
138- $grantRbac = $ (az rest -- method PUT -- url " $managementApiPrefix $ ( $billingResourceID ) /billingRoleAssignments/$ ( $roleAssignmentName ) ?api-version=2024-04-01" -- body $roleAssignmentPayloadJson ) | ConvertFrom-Json
137+ $grantRbac = $ (az rest -- method PUT -- url " $managementApiPrefix $ ( $billingResourceID ) /billingRoleAssignments/$ ( $roleAssignmentName ) ?api-version=2024-04-01" -- body " $roleAssignmentPayloadJson " ) | ConvertFrom-Json
139138
140139 if ($null -eq $grantRbac ) {
141140 $errorMessage = " The 'SubscriptionCreator' role could not be granted to the service principal. Please check the error message above and try again."
You can’t perform that action at this time.
0 commit comments