You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you create a role assignment by using Azure PowerShell, the Azure CLI, Bicep, or another infrastructure as code (IaC) technology, you specify the *principal type*. Principal types include *User*, *Group*, and *ServicePrincipal*. It's important to specify the correct principal type. Otherwise, you might get intermittent deployment errors, especially when you work with service principals and managed identities.
113
113
114
+
### Role assignments with identity not found
115
+
116
+
When you delete a user, group, service principal, or managed identity from Microsoft Entra ID, it's a good practice to remove any role assignments. The role assignments aren't removed automatically. Role assignments that refer to a deleted principal ID are listed as **Identity not found** in the Azure portal. Role assignments will continue to grant access to the deleted security principals if there are valid Microsoft Entra ID tokens and the tokens have not expired. For more information, see [Symptom - Role assignments with identity not found](troubleshooting.md#symptom---role-assignments-with-identity-not-found).
117
+
114
118
## Name
115
119
116
120
A role assignment's resource name must be a globally unique identifier (GUID).
@@ -122,9 +126,7 @@ Role assignment resource names must be unique within the Microsoft Entra tenant,
122
126
>
123
127
> If you create a role assignment by using Bicep or another infrastructure as code (IaC) technology, you need to carefully plan how you name your role assignments. For more information, see [Create Azure RBAC resources by using Bicep](../azure-resource-manager/bicep/scenarios-rbac.md).
124
128
125
-
### Resource deletion behavior
126
-
127
-
When you delete a user, group, service principal, or managed identity from Microsoft Entra ID, it's a good practice to delete any role assignments. They aren't deleted automatically. Any role assignments that refer to a deleted principal ID become invalid.
129
+
### Reusing a role assignment name
128
130
129
131
If you try to reuse a role assignment's name for another role assignment, the deployment will fail. This issue is more likely to occur when you use Bicep or an Azure Resource Manager template (ARM template) to deploy your role assignments, because you have to explicitly set the role assignment name when you use these tools. To work around this behavior, you should either remove the old role assignment before you recreate it, or ensure that you use a unique name when you deploy a new role assignment.
Copy file name to clipboardExpand all lines: articles/role-based-access-control/troubleshooting.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,7 @@ You deleted a security principal that had a role assignment. If you assign a rol
232
232
233
233
**Solution 2**
234
234
235
-
It isn't a problem to leave these role assignments where the security principal has been deleted. If you like, you can remove these role assignments using steps that are similar to other role assignments. For information about how to remove role assignments, see [Remove Azure role assignments](role-assignments-remove.yml).
235
+
It's a good practice to remove any role assignments that aren't being used. You can remove these role assignments using steps that are similar to other role assignments. For information about how to remove role assignments, see [Remove Azure role assignments](role-assignments-remove.yml).
236
236
237
237
In PowerShell, if you try to remove the role assignments using the object ID and role definition name, and more than one role assignment matches your parameters, you'll get the error message: `The provided information does not map to a role assignment`. The following output shows an example of the error message:
0 commit comments