azure-rbac

Finds least-privilege Azure RBAC roles and generates CLI and Bicep role assignment code.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/stephschofield/beth --skill azure-rbac-stephschofield
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: azure-rbac
Source: https://github.com/stephschofield/beth/tree/main/.github/skills/azure-rbac
Command: npx skills add https://github.com/stephschofield/beth --skill azure-rbac-stephschofield

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the correct Azure RBAC role for an identity is difficult: built-in roles are numerous, over-privileged assignments create security risk, and writing the assignment commands or Bicep by hand is error-prone. This Skill identifies the minimal role matching the permissions you need and produces the commands to assign it. ## Core Features & Use Cases - Least-Privilege Role Selection: Searches Azure documentation to find the built-in role with the minimum permissions matching your requirements. - Custom Role Generation: Creates a custom role definition when no built-in role fits the desired permission set. - Assignment Code Output: Generates Azure CLI commands and a Bicep snippet for assigning the role to an identity, plus guidance on the permissions (such as Microsoft.Authorization/roleAssignments/write) required to grant roles. - Use Case: You need a managed identity to read blobs from a storage account. Ask which role to assign, and receive the least-privilege role recommendation, the CLI assignment command, and the Bicep role assignment block. ## Quick Start Ask which Azure RBAC role a managed identity needs to read blobs from a storage account and request the CLI command and Bicep code to assign it.

Frequently Asked Questions about azure-rbac

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the least privilege Azure RBAC role for an identity?▼

Search Azure documentation for built-in roles whose permissions match only what the identity needs, then pick the smallest matching role. If no built-in role fits, create a custom role definition containing exactly the required permissions.

How to assign an Azure RBAC role using CLI or Bicep?▼

Generate the az role assignment create CLI command targeting the identity, scope, and role, or add a roleAssignments resource in Bicep following the Azure Bicep schema. Both approaches bind the chosen role to the identity at the desired scope.

What permissions do I need to assign Azure roles to others?▼

You need a role that includes the Microsoft.Authorization/roleAssignments/write permission. The most common options are User Access Administrator (least privilege, recommended for role assignment only), Owner, or a custom role with that permission.

What if no built-in Azure role matches my required permissions?▼

Create a custom role definition containing exactly the desired permissions, then assign it like any built-in role. This keeps access least-privilege instead of granting a broader built-in role.

When should I not use this RBAC role-selection approach?▼

Do not use it for creating or configuring managed identities, or for general Azure security hardening tasks. It is scoped to selecting roles and generating assignment commands, not identity lifecycle or broader security posture work.