Skip to content

Commit a53483d

Browse files
authored
Merge pull request #96740 from gmori1018/patch-2
Update troubleshooting.md
2 parents f566ff5 + 1d80c89 commit a53483d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

articles/role-based-access-control/troubleshooting.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,31 @@ The reason is likely a replication delay. The service principal is created in on
120120

121121
Set the `principalType` property to `ServicePrincipal` when creating the role assignment. You must also set the `apiVersion` of the role assignment to `2018-09-01-preview` or later. For more information, see [Assign Azure roles to a new service principal using the REST API](role-assignments-rest.md#new-service-principal) or [Assign Azure roles to a new service principal using Azure Resource Manager templates](role-assignments-template.md#new-service-principal).
122122

123+
### Symptom - ARM template role assignment returns BadRequest status
124+
125+
When you try to deploy an ARM template that assigns a role to a service principal you get the error:
126+
127+
`Tenant ID, application ID, principal ID, and scope are not allowed to be updated. (code: RoleAssignmentUpdateNotPermitted)`
128+
129+
**Cause**
130+
131+
The role assignment `name` is not unique, and it is viewed as an update.
132+
133+
**Solution**
134+
Provide an idempotent unique value for the role assignment `name`
135+
136+
```
137+
{
138+
"type": "Microsoft.Authorization/roleAssignments",
139+
"apiVersion": "2018-09-01-preview",
140+
"name": "[guid(concat(resourceGroup().id, variables('resourceName'))]",
141+
"properties": {
142+
"roleDefinitionId": "[variables('roleDefinitionId')]",
143+
"principalId": "[variables('principalId')]"
144+
}
145+
}
146+
```
147+
123148
### Symptom - Role assignments with identity not found
124149

125150
In the list of role assignments for the Azure portal, you notice that the security principal (user, group, service principal, or managed identity) is listed as **Identity not found** with an **Unknown** type.

0 commit comments

Comments
 (0)