azure-role-selector

Identify minimal Azure RBAC roles and generate CLI/Bicep assignments.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/sandeepmvn/githubmdfiles --skill azure-role-selector-sandeepmvn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-role-selector
Source: https://github.com/sandeepmvn/githubmdfiles/tree/main/VSContributed/skills/azure-role-selector
Command: npx skills add https://github.com/sandeepmvn/githubmdfiles --skill azure-role-selector-sandeepmvn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users identify the most appropriate and least privileged Azure roles for assigning to identities, ensuring security best practices are followed.

Core Features & Use Cases

  • Role Identification: Determines the minimal built-in or custom role needed for specific permissions.
  • CLI Command Generation: Provides commands to assign the identified role.
  • Bicep Snippet Generation: Offers Bicep code for role assignment.
  • Use Case: A security administrator needs to grant a new service principal read-only access to a specific resource group. This Skill will identify the 'Reader' role and provide the CLI command and Bicep snippet to assign it.

Quick Start

Use the azure-role-selector skill to find the minimal role for granting read access to a storage account.

Frequently Asked Questions about azure-role-selector

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

FAQPage Schema
How do I find the least privilege Azure roles for specific permissions?

To find the least privilege Azure roles, you identify the minimal built-in or custom role needed for specific RBAC permissions. This ensures you follow security best practices by granting only the access required for your identity assignments.

Can I generate Bicep code for Azure RBAC role assignments?

Yes, you can generate Bicep snippets for Azure RBAC role assignments. The process provides the specific Bicep code required to deploy role assignments alongside your infrastructure definitions securely.

How do I create custom Azure role definitions using CLI?

You can create custom Azure role definitions using CLI commands generated for your specific permission requirements. This allows you to define precise access control boundaries when built-in roles do not meet your exact needs.

What is the best way to assign read-only access to a resource group in Azure?

The best way to assign read-only access is by selecting the minimal role, such as the Reader role, for the identity. You then use the provided CLI command or Bicep snippet to apply the role assignment to the target resource group.

Does this approach work for both built-in and custom Azure RBAC roles?

Yes, this approach works for both built-in and custom Azure RBAC roles. It evaluates desired permissions to determine if an existing built-in role suffices or if generating a custom role definition via CLI is necessary.

When should I use custom Azure roles instead of built-in roles?

You should use custom Azure roles instead of built-in roles when precise access control is required and no existing role matches your exact permission needs. This prevents over-assignment of privileges in your Azure environment.