Connect every bill

Cost reporting for Azure subscriptions

Connect one service principal, see every Azure subscription it reads, give each subscription or team a segment and a budget, and schedule the report.

By the end of this guide, every Azure subscription you report on appears in Costfluent with an owning team, each team has a monthly budget, and a report reaches the people who review it. It is for the platform engineer or admin who runs the tenant's subscriptions. One Azure connection is one service principal, and it imports every subscription that principal can read cost for, or one whole billing scope, so several subscriptions do not need several connections. This guide connects the principal once, checks every subscription, turns subscriptions into owners with segments, puts a budget on each, and delivers a report on a schedule. Each step links to the page that owns the detail.

Before you start

  • Access in Costfluent to add connections, and in Azure the rights the connect page lists, such as registering an application and assigning roles on the subscriptions; see Access model and Connect Azure.
  • The agreement your subscriptions are billed under: the same prerequisites name the agreements Costfluent can read.
  • The subscriptions you will report on, and which team owns each.
  • A real connection: the sample data a new organization starts with holds synthetic Azure cost, not your subscriptions, and your first connection removes it.

1. Connect the service principal

Create one service principal and grant it Cost Management Reader on each subscription you want imported, or once at a management group, which also covers subscriptions added to it later. Add it under Integrations with the scope Subscriptions. Choose Billing account instead to import a whole Enterprise Agreement or Microsoft Customer Agreement bill, with the purchases, tax and credits that a subscription connection leaves out. A subscription is imported by one connection only, the one that imported it first. See Connect Azure and What is not imported.

2. Check the subscriptions

Open the connection from the Manage tab: its Subscriptions card lists every subscription the principal reaches, each one it reads cost for as Collecting, and one it cannot read or another connection already imports as Unavailable, with the reason. At billing scope, the card lists the subscriptions the scope's cost has named so far as Covered. A subscription missing there is one the principal holds no role on: grant the role, and it appears after the next check, with no new connection. See After connecting.

3. See cost per subscription

Open Cost reports and set the grouping to Sub-account: each row of the cost table is one subscription, by its ID, and at billing scope a charge billed without a subscription shows the billing account's ID. Add Service or Resource group as a second grouping to see what each subscription runs. See Explore cost data and Reporting dimensions.

4. Make subscriptions into owners

Add one segment per team, or per subscription where a subscription is a team. Then add one rule per segment with a Sub-account condition that names the team's subscription IDs; a team that owns several subscriptions needs one rule listing them all, and teams that share a subscription split it with a Resource group or tag condition. Preview each rule and watch coverage rise until the unallocated share is one you can explain. See Segments and allocation rules.

5. Put a budget on each segment

Create a monthly budget per segment and choose that segment under Measures: it counts the segment's direct cost and its share of shared cost. Pick the team's notification channel under Send to. See Budgets.

6. Deliver the report

Save a report grouped by Segment, then Sub-account, over the current month, and schedule it monthly to the email channel of the people who review it; for one team, save a report filtered to its subscriptions and schedule that one to the team. See Save and manage reports and Share and schedule reports.

Check the result

  • The connection's Subscriptions card lists every subscription you expected as Collecting, or as Covered at billing scope.
  • On Segments, the Coverage card's Unallocated share of the last whole month is one you can explain.
  • Each team's budget shows "Current spend" against "This period’s amount".
  • The report lists its schedule under Existing schedules as Active, with "Next:" naming the next delivery.

Keep it true

  • A new subscription appears under Sub-account with its first cost, and under no segment until a rule names it. Add it to the owning team's rule; the rule restates past months too.
  • A subscription reaches the connection without a new one: through a role on it or on its management group, or, at billing scope, by being billed there.
  • Moving a subscription between teams is a rule change, not a report change.