> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/sre-ai-agent/data-sources/azure.md).

# Azure

## What the Agent Can Do

* List Azure resources by type — VMs, App Services, SQL databases, Storage
* List AKS clusters — status, version, node count, power state
* Query Azure Monitor metrics for specific resources
* Get Activity Log — find recent changes, deployments, failures

## Setup Instructions

1. Go to **Azure Portal** > **Azure Active Directory** > **App Registrations**
2. Create a new registration (e.g., `Pagerly SRE`)
3. Add **Reader** role on your subscription (IAM > Add role assignment)
4. Create a client secret under **Certificates & Secrets**
5. Use `az account get-access-token` to get a Bearer token
6. Enter the token and your subscription ID in the Pagerly dashboard

## Required Credentials

| Field               | Description                | Example                  |
| ------------------- | -------------------------- | ------------------------ |
| **Bearer Token**    | Azure OAuth access token   | `eyJ0eXAiOiJKV1Qi...`    |
| **Subscription ID** | Your Azure subscription ID | `12345678-abcd-efgh-...` |

## Context Prompt Tips

> *"Our AKS cluster is prod-aks in eastus. Key resource group is rg-production. App Service is api-service."*

## Docs

* [Azure REST API Reference](https://learn.microsoft.com/en-us/rest/api/azure/)
