About azure-rbac
A skill for determining Azure RBAC role definitions and generating assignment guidance for an identity. It checks for a suitable built-in role, falls back to a custom role when needed, and provides CLI and Bicep outputs.
Key features
- 01Finds matching built-in roles
- 02Generates custom role definitions
- 03Creates role assignment CLI commands
- 04Provides Bicep role assignment snippets
- 05Identifies role-assignment prerequisites
Use cases
- 01Choosing permissions for an Azure identity
- 02Creating a custom role when built-in roles do not fit
- 03Preparing CLI and Bicep role assignment changes
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ microsoft/ azure-skills --skill azure-rbacAfter installing, type/azure-rbacin Claude Code to confirm it loaded.
Details
From the project READMEUse the 'azure__documentation' tool to find the minimal role definition that matches the desired permissions the user wants to assign to an identity. If no built-in role matches the desired permissions, use the 'azure__extension_cli_generate' tool to create a custom role definition with the desired permissions. Then use the 'azure__extension_cli_generate' tool to generate the CLI commands needed to assign that role to the identity. Finally, use the 'azure__bicepschema' and 'azure__get_azure_bestpractices' tools to provide a Bicep code snippet for adding the role assignment. If user is asking about role necessary to set access, refer to Prerequisites for Granting Roles down below:
Prerequisites for Granting Roles
To assign RBAC roles to identities, you need a role that includes the Microsoft.Authorization/roleAssignments/write permission. The most common roles with this permission are:
- User Access Administrator (least privilege - recommended for role assignment only)
- Owner (full access including role assignment)
- Custom Role with
Microsoft.Authorization/roleAssignments/write