Cloud · Integration · New in 0.4.0

Azure cost tracking: daily cost per resource group

See what each Azure resource group and service costs per day, Azure OpenAI included, next to your hosting, database and AI bills, with an alert when spend jumps.

What Burnstack tracks

  • Daily actual cost in USD per resource group and service, from the Cost Management Query API (Microsoft docs). Actual cost is what's billed, so a purchase counts on the day it's made
  • One subscription per key, named after the subscription. Charges outside any resource group, such as Marketplace or reservations, sit on the subscription itself
  • Azure OpenAI and other Foundry models, as the Cognitive Services line of their resource group
  • The last 90 days on the first sync

Alerts

  • Vendor spend spike: a day above 2.5× Azure's 14-day median

The key you'll need

A Microsoft Entra service principal with only the Cost Management Reader role on the subscription, Azure's built-in role for viewing cost data (Microsoft docs). The key help in Burnstack gives the exact Azure CLI command (az ad sp create-for-rbac with that one role); run it in a terminal or Azure Cloud Shell and it prints the value to paste: TENANT_ID:CLIENT_ID:CLIENT_SECRET:SUBSCRIPTION_ID.

Burnstack checks the key with Microsoft Azure, shows the account it belongs to when Microsoft Azure lets the key see it, and stores it in your computer's keychain (macOS Keychain or Windows Credential Manager). It only reads billing and usage.

Connect it: Microsoft Azure

About 8 minBilled

Need

  • Key: Service principal and subscription ID
  • Plan: Pay-as-you-go, EA, MCA, MSDN or Visual Studio subscriptions billed in USD. EA needs "Account owners can view charges"; MCA needs the "Azure charges" policy on.
  • Permissions: Cost Management Reader (on the subscription)

Create a service principal that can only read costs, with the Azure CLI (or Cloud Shell): az ad sp create-for-rbac --name burnstack-cost-reader --role "Cost Management Reader" --scopes /subscriptions/SUBSCRIPTION_ID. Paste four values joined by colons: TENANT_ID:CLIENT_ID:CLIENT_SECRET:SUBSCRIPTION_ID (the command's tenant, appId and password, then the subscription ID). The client secret expires (after 1 year by default): renew it with az ad sp credential reset --id CLIENT_ID and update the key. One subscription per key; costs must be billed in USD. Azure's cost data lags 8–72 hours.

Steps

Open Microsoft Azure's key page ↗

  1. In App registrations, register an app named burnstack-cost-reader.
  2. In the subscription's Access control (IAM), add a role assignment: Cost Management Reader for that app.
  3. In the app's Certificates & secrets, add a client secret with an expiry.
  4. Paste TENANT_ID:CLIENT_ID:CLIENT_SECRET:SUBSCRIPTION_ID into Burnstack.
  5. Or run az ad sp create-for-rbac (see Needs) in Cloud Shell.

Paste it

In Burnstack: Connectors → Microsoft Azure → Add key → paste → Validate & save. The key goes straight into your computer's keychain.

If it fails

AADSTS7000222: The provided client secret keys for app … are expired.
Add a new client secret (or az ad sp credential reset --id CLIENT_ID) and update the key in Burnstack.
AADSTS700016: Application with identifier … was not found in the directory
The client ID or tenant is wrong: use the app's Application (client) ID and Directory (tenant) ID.
AuthorizationFailed
The app needs Cost Management Reader on the subscription; a new role assignment can take up to 30 minutes to apply.
isn't allowed to read costs
On an Enterprise Agreement turn on "Account owners can view charges"; on an MCA turn on the billing profile's "Azure charges" policy.

Let your AI do the clicking

Paste this into an AI assistant that can use your browser, such as Claude in Chrome. It opens Microsoft Azure's key page and sets only the permissions above, then stops before the final button that creates the key.

Open https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade in my browser. Choose 'New registration', name it 'burnstack-cost-reader', keep 'Accounts in this organizational directory only' and choose Register. Then open Subscriptions → the subscription I want to track → Access control (IAM) → Add → Add role assignment, pick the 'Cost Management Reader' role, under Members choose 'User, group, or service principal' → Select members → burnstack-cost-reader, then 'Review + assign'. Then return to the app registration → Certificates & secrets → Client secrets → New client secret, with the description 'Burnstack'. Tell me the Directory (tenant) ID, the Application (client) ID and the subscription ID; they aren't secret. Set Expires to 90 days (or the closest shorter option). Stop before clicking 'Add' (the final button that creates the client secret) and tell me it's ready. I'll click it, copy the client secret and paste it into Burnstack myself. Don't copy, read or paste the client secret, and don't grant broader access or change any other setting. If Microsoft Azure asks me to sign in or confirm with 2FA, wait for me.

The key never passes through the AI: you click that last button yourself, copy the key and paste it into Burnstack.

What you'll see

  • Billed: Billed cost, as Microsoft Azure charges it.
  • History: 13 months.
  • Delay: 8–24 hours (EA, MCA), up to 72 hours (pay-as-you-go).

Good to know

  • Client secrets expire: the CLI makes one that's valid for a year unless you ask for longer (Azure CLI docs). Renew it with az ad sp credential reset and paste the new key. Until then syncs fail with a message that says so, and the stale-data alert tells you.
  • Subscriptions billed in US dollars only.
  • Costs are Azure's estimates until the invoice is issued, and don't include credits, taxes or support charges. Data arrives within 8 to 24 hours on Enterprise Agreement and Microsoft Customer Agreement subscriptions, and up to 72 hours on pay-as-you-go (Microsoft docs), so the last days read low until later syncs catch up.
  • Azure OpenAI isn't split by model or deployment yet: it shows as Cognitive Services in its resource group.
  • One subscription per key: no billing account, management group or single resource group scope.
  • Cost Management doesn't support classic CSP, sponsorship or Azure for Students subscriptions (Microsoft docs). On an Enterprise Agreement, "Account owners can view charges" must be on; on a Microsoft Customer Agreement, the billing profile's "Azure charges" policy.
Burnstack Connectors, Add cost source tab: a search box, category filters and one card per vendor with its key steps

One bill, not a dashboard per vendor

Burnstack puts Azure next to the rest of your spend and lets you group it by product with applications. Other integrations: Vercel, Neon, Supabase, OpenAI, Anthropic, GitHub, OpenRouter, DigitalOcean, Twilio, Stripe fees, Cloudflare, Netlify, AWS, Datadog, Sentry, Cursor, PlanetScale, Google Cloud, MongoDB Atlas, Railway, Render, Heroku, Akamai (Linode), Vultr, Fastly, Runpod, xAI, Together AI, fal.ai, Runway, Upstash.

Azure questions

Does Burnstack track Azure OpenAI costs?
Yes, as part of the Cognitive Services cost of the resource group each Azure OpenAI or Foundry resource is in. A split per model or deployment isn't included yet.
Can the service principal change anything in Azure?
Not your resources. Cost Management Reader can read cost data and settings such as budgets and exports; its only other permission is opening Azure support tickets, which Burnstack never does. Burnstack only sends cost queries with it.

Start watching back.

Five minutes to connect your first vendor. Free for Mac, forever, and every byte stays yours.