StackSpendDocs

Azure

Connect your Azure subscriptions to StackSpend via the Cost Management Query API.

What StackSpend tracks

StackSpend connects to the Azure Cost Management Query API and pulls spend at daily granularity by subscription, service and resource group. This connector does not return resource tags. Initial history requests up to 90 days where available; provider reporting and successful sync determine freshness.

LatencyHistoricalSetup time
Provider reporting plus scheduled syncUp to 90 days where available5 min

What's included

StackSpend uses Azure's Actual Cost, summed daily by subscription, service, and resource group at your negotiated/effective prices (including reservation and savings-plan effects). This matches the Azure portal's Cost Analysis → Actual cost view. Figures are pre-tax and exclude tax, support charges, and credits. A connection can cover a single subscription, a management group (all subscriptions in the tenant), or a billing account.

Spend is pre-tax.

Like the Azure portal's Cost Analysis, StackSpend reports pre-tax costs. Tax isn't available from Azure's cost API — it appears only on the monthly invoice — so StackSpend's Azure total reads lower than a tax-inclusive invoice by the amount of tax.

Authentication

StackSpend queries billing data and does not change Azure resources. Review the Cost Management Reader role separately: its authority includes resource reads and support-ticket actions. The recommended app authorization flow is separate from assigning the correct RBAC role; a bring-your-own service principal is also supported.

1

Authorize the StackSpend app

In StackSpend, go to Settings → Integrations → Azure, leave the method on Authorize StackSpend (recommended), and click Connect.

Sign in as a tenant administrator and approve the consent screen. This adds StackSpend as a service principal in your tenant — there is nothing to create, and nothing that expires. After approving, you'll be shown your Tenant ID; copy it.

Admin consent is required once.A Microsoft Entra administrator must approve the consent screen the first time. After that, the StackSpend service principal exists in your tenant permanently (until you remove it).
2

Assign the Cost Management Reader role

Open Subscriptions in the Azure Portal, select your subscription, then go to Access control (IAM) → Add role assignment.

Search for the Cost Management Reader role, select it, and click Next. Click Select members, search for StackSpend Azure Provider, select the record, click Select, then Review + assign. Assign it at the subscription scope (a resource-group assignment won't make the subscription discoverable).

Confirm the assignment landed.You can verify the role reached the right app under Enterprise applications → StackSpend. Role assignments can take a minute or two to propagate.
3

Connect in StackSpend

Back in StackSpend, your Tenant ID is filled in automatically from the consent step. Pick your subscription from the Subscription dropdown (StackSpend lists the ones it can read) — or paste a Subscription ID — then click Test and Connect to begin the first sync.

Your Tenant ID is also available any time in Microsoft Entra ID → Overview.

Any issues? Contact support@stackspend.app.

Frequently asked questions

Why can Azure cost data differ from the invoice?

Cost Management Actual Cost and a tax-inclusive invoice are different bases. Match the period, subscription and currency before you compare them.

How do I connect Azure?

Use a service principal with Cost Management Reader on the subscriptions you want. StackSpend reads Actual Cost. It does not change Azure resources.

When do Azure budget alerts arrive?

After the next sync, at least every 6 hours. Billing lands 24–48 hours after usage. Alerts go by email.

How much Azure history is available?

From your first sync, up to 90 days where Azure still has the rows.

Connect Azure to StackSpend — StackSpend Docs