azure-rbac

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

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill azure-rbac-alahmadiq8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-rbac
Source: https://github.com/AlahmadiQ8/sre-agent-demo/tree/main/.claude/skills/azure-rbac
Command: npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill azure-rbac-alahmadiq8

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the correct Azure RBAC role for an identity is error-prone: built-in roles are numerous, over-privileged assignments create security risk, and writing the assignment commands or Bicep by hand is tedious. This Skill identifies the minimal role matching the permissions you need and produces ready-to-use assignment artifacts. ## Core Features & Use Cases - Least-Privilege Role Lookup: Searches Azure documentation to find the built-in role that minimally matches the permissions you want to grant. - Custom Role Generation: Creates a custom role definition when no built-in role fits the desired permission set. - CLI and Bicep Output: Generates Azure CLI commands for the role assignment plus a Bicep snippet following Azure best practices. - 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 (e.g., Storage Blob Data Reader), the az CLI assignment command, and the Bicep roleAssignment resource. ## Quick Start Ask which Azure RBAC role you should assign to a managed identity so it can read blobs from a storage account, and request the CLI command and Bicep code for the assignment.

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 narrowest match. If no built-in role fits, create a custom role definition containing exactly the required permissions.

How do I assign an Azure role to a managed identity with Bicep?

Use a Microsoft.Authorization/roleAssignments resource in Bicep referencing the role definition ID, the managed identity's principal ID, and the target scope. The Skill generates this snippet following Azure best practices.

What permissions do I need to assign Azure RBAC roles?

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

What if no built-in Azure role matches the permissions I need?

Create a custom role definition containing exactly the desired permissions, then assign it like any built-in role. The Skill generates the custom role definition and the CLI commands to assign it.

Which Azure role grants read access to storage blobs?

Storage Blob Data Reader is the built-in role for reading blob data without write access. Assign it at the storage account or container scope to the identity that needs read-only access.