azure-role-selector

Map requested permissions to least-privilege Azure role definitions and generate CLI and Bicep assignments.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/pczhao1210/reuseable-agents-and-skills --skill azure-role-selector-pczhao1210
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-role-selector
Source: https://github.com/pczhao1210/reuseable-agents-and-skills/tree/main/.agents/skills/azure-role-selector
Command: npx skills add https://github.com/pczhao1210/reuseable-agents-and-skills --skill azure-role-selector-pczhao1210

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps operators and engineers determine which Azure role to assign to an identity so the identity receives only the permissions it needs, reducing over-permission risk and simplifying governance.

Core Features & Use Cases

  • Tooling and Preflight Checks: Verifies availability of required Azure MCP tools before performing analysis and prompts for installation if missing.
  • Least-Privilege Role Discovery: Searches Azure documentation and role definitions to find the minimal built-in role matching requested permissions, or generates a custom role when necessary.
  • Assignment Automation & IaC: Produces CLI commands for role assignment and a Bicep snippet to incorporate the assignment into infrastructure-as-code flows.
  • Use Case: During a deployment or access review, provide a set of requested actions for a service principal and receive a recommended role, assignment commands, and a Bicep snippet to apply the change.

Quick Start

Analyze the requested permission set and recommend the least-privilege built-in role or a custom role, then output CLI assignment commands and a Bicep snippet to apply it.

Frequently Asked Questions about azure-role-selector

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

FAQPage Schema
How do I determine the least-privilege Azure role for a specific set of permissions?

To determine the least-privilege Azure role, you map requested permissions to built-in or custom role definitions. This process identifies the minimal role matching your needs or generates a custom role to enforce minimal privileges.

Can I generate Bicep snippets and CLI commands for Azure role assignments automatically?

Yes, you can generate Bicep snippets and CLI commands for Azure role assignments. After identifying the appropriate role, the system outputs the assignment commands and infrastructure-as-code snippets needed to apply the change.

What is least-privilege role discovery and when do I need it for Azure IAM workflows?

Least-privilege role discovery searches Azure documentation and role definitions to find the minimal built-in role matching requested permissions. You need it during access reviews, deployment preflight checks, and automation scripts to reduce over-permission risk.

Does this approach require Azure MCP tooling to validate role definitions?

Yes, validating role definitions and synthesizing custom roles leverages Azure MCP tooling. The process verifies the availability of required MCP tools before analysis and prompts for installation if missing.

What is the best way to enforce minimal privileges for a service principal during a deployment?

The best way to enforce minimal privileges is providing the service principal's requested actions to receive a recommended role, assignment commands, and a Bicep snippet. This ensures the identity receives only the permissions it needs for deployment.