Prerequisites
Before installing azd rest, make sure you have:
- Azure Developer CLI (azd) installed on your system
- Azure subscription and appropriate permissions
- Azure CLI login — run
az loginto authenticate
If you don't have azd installed, visit the official installation guide.
Install azd rest
Install the azd rest extension using the following commands for your platform:
# Install Azure Developer CLIwinget install microsoft.azd
# Add extension sourceazd extension source add -n jongio -t url -l https://jongio.github.io/azd-extensions/registry.json
# Install extensionazd extension install jongio.azd.rest# Install Azure Developer CLIbrew tap azure/azd && brew install azd
# Add extension sourceazd extension source add -n jongio -t url -l https://jongio.github.io/azd-extensions/registry.json
# Install extensionazd extension install jongio.azd.rest# Install Azure Developer CLIcurl -fsSL https://aka.ms/install-azd.sh | bash
# Add extension sourceazd extension source add -n jongio -t url -l https://jongio.github.io/azd-extensions/registry.json
# Install extensionazd extension install jongio.azd.restVerify Installation
Confirm that azd rest is installed correctly:
azd rest versionYou should see output similar to:
azd restVersion: 0.1.0Build Date: 2026-01-09T10:30:45ZGit Commit: abc123defMake Your First Request
List your Azure subscriptions — authentication is handled automatically:
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01You should see a JSON response with your subscriptions:
{ "value": [ { "id": "/subscriptions/00000000-0000-0000-0000-000000000000", "subscriptionId": "00000000-0000-0000-0000-000000000000", "displayName": "My Subscription", "state": "Enabled" } ]}How Authentication Works
azd rest automatically detects the Azure service you're calling and applies the correct OAuth scope.
It uses your Azure CLI credentials (via az login) to acquire tokens.
Automatic Scope Detection
No need to specify scopes for common Azure services:
# Management API — auto-detectedazd rest get https://management.azure.com/subscriptions?api-version=2020-01-01
# Key Vault — auto-detectedazd rest get https://myvault.vault.azure.net/secrets/mysecret?api-version=7.4
# Microsoft Graph — auto-detectedazd rest get https://graph.microsoft.com/v1.0/meCustom Scopes
For non-Azure endpoints, provide a scope manually:
azd rest get https://api.myservice.com/data --scope https://myservice.com/.defaultNo Authentication
For public APIs that don't require auth:
azd rest get https://api.github.com/repos/Azure/azure-dev --no-authCommon Commands
GET Request
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01POST with JSON Body
azd rest post https://management.azure.com/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Storage/storageAccounts/{name}?api-version=2021-04-01 \ --data '{"location":"eastus","kind":"StorageV2","sku":{"name":"Standard_LRS"}}'POST with Body from File
azd rest post https://api.example.com/resource --data-file request.jsonVerbose Output
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01 --verboseSave Response to File
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01 \ --output-file subscriptions.jsonCustom Headers
azd rest get https://api.example.com/resource \ --header "X-Custom-Header: value" \ --header "Accept: application/json"