Skip to content

Commit f999e30

Browse files
Merge pull request #266743 from rolyon/rolyon-rbac-troubleshoot-custom-roles-pim
[Azure RBAC] Eligible custom role assignments in PIM
2 parents eaa80f4 + 5b0500e commit f999e30

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

articles/role-based-access-control/custom-roles.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rolyon
66
manager: amycolannino
77
ms.service: role-based-access-control
88
ms.topic: conceptual
9-
ms.date: 11/15/2023
9+
ms.date: 02/22/2024
1010
ms.author: rolyon
1111
---
1212

@@ -195,8 +195,11 @@ Here are steps to help find the role assignments before deleting a custom role:
195195
- In the [AssignableScopes](role-definitions.md#assignablescopes) section, get the management groups, subscriptions, and resource groups.
196196
- Iterate over the `AssignableScopes` and [list the role assignments](role-assignments-list-portal.md).
197197
- [Remove the role assignments](role-assignments-remove.md) that use the custom role.
198+
- If you are using [Microsoft Entra Privileged Identity Management](/entra/id-governance/privileged-identity-management/pim-resource-roles-assign-roles), remove eligible custom role assignments.
198199
- [Delete the custom role](custom-roles-portal.md#delete-a-custom-role).
199200

201+
For information about how to find unused custom roles, see [Symptom - No more role definitions can be created](troubleshoot-limits.md#symptom---no-more-role-definitions-can-be-created).
202+
200203
## Custom role limits
201204

202205
The following list describes the limits for custom roles.

articles/role-based-access-control/troubleshoot-limits.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rolyon
66
manager: amycolannino
77
ms.service: role-based-access-control
88
ms.topic: how-to
9-
ms.date: 01/12/2024
9+
ms.date: 02/22/2024
1010
ms.author: rolyon
1111
---
1212

@@ -63,7 +63,7 @@ To reduce the number of role assignments in the subscription, add principals (us
6363

6464
1. Run the following query to get the role assignments with the same role and at the same scope, but for different principals.
6565

66-
This query checks active role assignments and doesn't consider eligible role assignments in [Microsoft Entra Privileged Identity Management](../active-directory/privileged-identity-management/pim-resource-roles-assign-roles.md).
66+
This query checks active role assignments and doesn't consider eligible role assignments in [Microsoft Entra Privileged Identity Management](/entra/id-governance/privileged-identity-management/pim-resource-roles-assign-roles). To list eligible role assignments, you can use the Microsoft Entra admin center, PowerShell, or REST API. For more information, see [Get-AzRoleEligibilityScheduleInstance](/powershell/module/az.resources/get-azroleeligibilityscheduleinstance) or [Role Eligibility Schedule Instances - List For Scope](/rest/api/authorization/role-eligibility-schedule-instances/list-for-scope).
6767

6868
If you are using [role assignment conditions](conditions-overview.md) or [delegating role assignment management with conditions](delegate-role-assignments-overview.md), you should use the Conditions query. Otherwise, use the Default query.
6969

@@ -147,7 +147,7 @@ To reduce the number of role assignments in the subscription, remove redundant r
147147

148148
1. Run the following query to get the role assignments with the same role and same principal, but at different scopes.
149149

150-
This query checks active role assignments and doesn't consider eligible role assignments in [Microsoft Entra Privileged Identity Management](../active-directory/privileged-identity-management/pim-resource-roles-assign-roles.md).
150+
This query checks active role assignments and doesn't consider eligible role assignments in [Microsoft Entra Privileged Identity Management](/entra/id-governance/privileged-identity-management/pim-resource-roles-assign-roles). To list eligible role assignments, you can the Microsoft Entra admin center, PowerShell, or REST API. For more information, see [Get-AzRoleEligibilityScheduleInstance](/powershell/module/az.resources/get-azroleeligibilityscheduleinstance) or [Role Eligibility Schedule Instances - List For Scope](/rest/api/authorization/role-eligibility-schedule-instances/list-for-scope).
151151

152152
If you are using [role assignment conditions](conditions-overview.md) or [delegating role assignment management with conditions](delegate-role-assignments-overview.md), you should use the Conditions query. Otherwise, use the Default query.
153153

@@ -217,7 +217,7 @@ To reduce the number of role assignments in the subscription, replace multiple b
217217

218218
1. Run the following query to get role assignments with the same principal and same scope, but with different built-in roles.
219219

220-
This query checks active role assignments and doesn't consider eligible role assignments in [Microsoft Entra Privileged Identity Management](../active-directory/privileged-identity-management/pim-resource-roles-assign-roles.md).
220+
This query checks active role assignments and doesn't consider eligible role assignments in [Microsoft Entra Privileged Identity Management](/entra/id-governance/privileged-identity-management/pim-resource-roles-assign-roles). To list eligible role assignments, you can use the Microsoft Entra admin center, PowerShell, or REST API. For more information, see [Get-AzRoleEligibilityScheduleInstance](/powershell/module/az.resources/get-azroleeligibilityscheduleinstance) or [Role Eligibility Schedule Instances - List For Scope](/rest/api/authorization/role-eligibility-schedule-instances/list-for-scope).
221221

222222
If you are using [role assignment conditions](conditions-overview.md) or [delegating role assignment management with conditions](delegate-role-assignments-overview.md), you should use the Conditions query. Otherwise, use the Default query.
223223

@@ -272,7 +272,7 @@ To reduce the number of role assignments in the subscription, replace multiple b
272272

273273
### Solution 4 - Make role assignments eligible
274274

275-
To reduce the number of role assignments in the subscription and you have Microsoft Entra ID P2, make role assignments eligible in [Microsoft Entra Privileged Identity Management](../active-directory/privileged-identity-management/pim-resource-roles-assign-roles.md) instead of permanently assigned.
275+
To reduce the number of role assignments in the subscription and you have Microsoft Entra ID P2, make role assignments eligible in [Microsoft Entra Privileged Identity Management](/entra/id-governance/privileged-identity-management/pim-resource-roles-assign-roles) instead of permanently assigned.
276276

277277
### Solution 5 - Add an additional subscription
278278

@@ -323,7 +323,7 @@ Follow these steps to find and delete unused Azure custom roles.
323323

324324
1. Run the following query to get all custom roles that don't have any role assignments:
325325

326-
This query checks active role assignments and doesn't consider eligible role assignments in [Microsoft Entra Privileged Identity Management](../active-directory/privileged-identity-management/pim-resource-roles-assign-roles.md).
326+
This query checks active role assignments and doesn't consider eligible custom role assignments in [Microsoft Entra Privileged Identity Management](/entra/id-governance/privileged-identity-management/pim-resource-roles-assign-roles). To list eligible custom role assignments, you can use the Microsoft Entra admin center, PowerShell, or REST API. For more information, see [Get-AzRoleEligibilityScheduleInstance](/powershell/module/az.resources/get-azroleeligibilityscheduleinstance) or [Role Eligibility Schedule Instances - List For Scope](/rest/api/authorization/role-eligibility-schedule-instances/list-for-scope).
327327

328328
[!INCLUDE [resource-graph-query-authorization-unused-custom-roles](../governance/includes/resource-graph/query/authorization-unused-custom-roles.md)]
329329

0 commit comments

Comments
 (0)