Reputation: 1
Are there APIs to list all the RBAC permissions available for Azure Resources ?
I am trying to get the list in order to identify the privileged custom roles and effective permissions of users in the Subscription. I am looking for the list of 1.actions 2.notActions 3.dataActions 4.notDataActions properties of Permissions for all Azure resources.
Please let me know in case you have come across any Azure apis that can do this.Thanks.
Upvotes: 0
Views: 1045
Reputation: 7483
The method with Powershell uses foreach
to iterate through each resources and retrieve the RBAC permissions. There is no direct method to list of RBAC permissions for all Azure Resources with Azure API.
As a workaround, you need to get all resources in subscription, then loop to get the permissions in each resource.
Follow this to get all resources:
POST https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01
Follow this to get the permissions:
GET /deviceManagement/roleDefinitions/{roleDefinitionId}/roleAssignments
Upvotes: -1