Skip to main content

Call any Azure API, already authenticated

Point azd rest at a URL. It figures out the right scope, gets a token, and handles retries and paging for you.

azd rest

Features

All HTTP Methods

GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS with JSON body support from inline data or files.

Smart Azure Auth

Reads the hostname and picks the right OAuth scope: Management API, Graph, Key Vault, Storage, Cosmos DB, and more.

Auto Pagination

Follows nextLink, @odata.nextLink, and Link headers automatically with --paginate.

Retry Logic

Exponential backoff with configurable retries for transient errors (5xx, network failures). Default 3 retries.

Response Formatting

Pretty-printed JSON by default. Raw, compact JSON, or binary output modes. Save responses to file.

Command Builder

Use the docs builder to combine method, URL, auth, body, output, and diagnostic flags before copying a command.

Token Security

Automatic token redaction in verbose output. SSRF protection, header sanitization, and response size limits built in.

Smart Scope Detection

Just provide a URL. azd rest detects the correct OAuth scope automatically.

Azure Management

Terminal window
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01

→ Scope: https://management.azure.com/.default

Key Vault

Terminal window
azd rest get https://myvault.vault.azure.net/secrets/mysecret?api-version=7.4

→ Scope: https://vault.azure.net/.default

Microsoft Graph

Terminal window
azd rest get https://graph.microsoft.com/v1.0/me

→ Scope: https://graph.microsoft.com/.default

Public API (No Auth)

Terminal window
azd rest get https://api.github.com/repos/Azure/azure-dev --no-auth

→ No authentication needed

See every supported service →

Quick Start

1

Install Extension

Terminal window
# Install Azure Developer CLI
winget install microsoft.azd
# Add extension source
azd extension source add -n jongio -t url -l https://jongio.github.io/azd-extensions/registry.json
# Install extension
azd extension install jongio.azd.rest
2

Verify Installation

Terminal window
azd rest version
3

Make Your First Request

Terminal window
# List your Azure subscriptions
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01

Usage Examples

POST with JSON Body

Terminal window
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"}}'

Verbose Output with Headers

Terminal window
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01 --verbose
# > GET https://management.azure.com/subscriptions?api-version=2020-01-01
# > Authorization: Bearer ***REDACTED***
# < 200 OK
# Request completed in 234ms

Save Response to File

Terminal window
azd rest get https://management.azure.com/subscriptions?api-version=2020-01-01 \
--output-file subscriptions.json

See more examples →Build a command →

Ready to get started?

Install azd rest and start making authenticated Azure REST API calls in seconds.

Get Started Now