Back/Engineering/Warp
IntermediateEngineering

How to Automate Azure User Role Management with AI in the Terminal

Bypass the complex Azure web portal and manage user permissions in seconds. Use natural language prompts in the Warp terminal to assign multiple roles to users instantly, saving significant time on cloud administration.

How to Automate Azure User Role Management with AI in the Terminal

03:57 to 10:28: Microsoft AI VP Sonali Yamada uses Warp to translate a plain-language role request into Azure CLI commands and applies it from the terminal.

Before you start

What you need

  • The target user principal name or object ID
  • The Azure subscription, resource group, or resource scope
  • The exact roles to add and the Azure CLI authenticated to the correct tenant

What you’ll make

The intended Azure roles assigned to the correct user at the correct scope, with the resulting assignments listed for confirmation.

Tools used

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

4 steps

Step01

Open the Warp Terminal

Open the Warp terminal. This environment integrates AI to help execute command line tasks.

Example prompt
Open the Warp terminal. This environment integrates AI to help execute command line tasks.

My actual values:
[insert the files, settings, accounts, or constraints for this step]

Give me the exact commands, settings, or output to use. Finish with a pass or fail check for open the warp terminal.
Step02

Write a Natural Language Prompt

Type a natural language command that specifies the user, the Azure roles to assign, and the relevant subscription. Be as specific as possible with names and IDs.

Example prompt
give him Azure AI user and Azure AI project Manager on this subscription that I'm looking at. ... actually I need to give him contributor role on the whole subscription
Step03

Execute the AI-Generated Commands

Review the series of Azure CLI (az) commands that Warp generates from your prompt, then approve them for execution. Warp will attempt to correct its approach if it encounters an error with a command.

Example prompt
Review the series of Azure CLI (az) commands that Warp generates from your prompt, then approve them for execution. Warp will attempt to correct its approach if it encounters an error with a command.

My actual values:
[insert the files, settings, accounts, or constraints for this step]

Give me the exact commands, settings, or output to use. Finish with a pass or fail check for execute the ai-generated commands.
Step04

Add Rules for Reliability (Optional)

To make the process more reliable, add rules in Warp's settings to guide the AI's behavior. For example, create a rule that reminds you to complete a prerequisite, like activating owner access, before it attempts to assign roles.

Example prompt
When I ask to perform [specific action, e.g., 'assign roles on a resource group'], first remind me to [preparatory step, e.g., 'activate my owner access']. Do not proceed until I confirm.

What good looks like

  • The command targets the intended tenant, subscription, scope, and user
  • The resulting role list contains every requested role once
  • No broader owner or administrator permission is introduced

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

The generated command targets the wrong subscription or scope
Run the read-only account and scope checks first, correct the identifiers, and regenerate the command.
A role name is ambiguous or unavailable
List matching Azure role definitions and select the exact role definition ID before assignment.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready