Microsoft Azure Cost Management

Microsoft Azure Cost Management

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Connect Microsoft Azure Cost Management to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.

Pull your daily Azure spend into the PostHog Data warehouse, broken down by service, resource group, and resource.

Register an app in Microsoft Entra ID, create a client secret for it, and give its service principal the Cost Management Reader role on the scope you want to sync. Then enter the directory (tenant) ID, the application (client) ID, and the secret value.

The scope is the Azure Resource Manager path to read cost for, without a leading slash — for example subscriptions/00000000-0000-0000-0000-000000000000 for one subscription, or providers/Microsoft.Billing/billingAccounts/1234567 for an enterprise billing account.

Configuration

OptionTypeRequired
Directory (tenant) IDtextYes
Application (client) IDtextYes
Client secretpasswordYes
ScopetextYes
Start date (historical backfill)textNo

Linking Microsoft Azure Cost Management to PostHog

  1. Go to the Data pipeline page in PostHog
  2. Click New source and select Microsoft Azure Cost Management
  3. Fill in the required configuration fields
  4. Click Next, select the tables you want to sync, and then press Import

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
cost_by_service

Daily actual cost per Azure service. Supports incremental sync on the usage date.

Incremental, Full refreshusage_date
cost_by_resource_group

Daily actual cost per resource group. Supports incremental sync on the usage date.

Incremental, Full refreshusage_date
cost_by_resource

Daily actual cost per resource. The widest table — one row per resource per day.

Incremental, Full refreshusage_date
amortized_cost_by_service

Daily amortized cost per Azure service, spreading reservation and savings-plan purchases across their term.

Incremental, Full refreshusage_date
forecast

Azure's forecast of upcoming daily cost per service. Full refresh only.

Full refresh
dimensions

Dimensions available for grouping and filtering cost on this scope. Full refresh only.

Full refresh