Methodology

How the audit finds and scores waste

Every rule, threshold and assumption the free report and the read-only scan use. Each waste area links to Microsoft's own documentation, so the claims are not just ours. All savings figures are estimates until a change is made and measured in your own bill.

Two ways to run it

Large estates

With more than one subscription, or with --management-group, --cost-scope or --focus, scan.sh runs one estate scan instead of one scan per subscription. It is still read-only and every az command still passes the allowlist.

  • Inventory. Resource Graph queries run once for the estate, at management group scope (up to 10 groups a request) or in groups of up to 1,000 subscriptions a request, the most Microsoft allows, and follow every page (1,000 rows a page). A per-subscription waste count (unattached disks, unassociated public IPs, snapshots, stopped and deallocated VMs) is computed by Resource Graph itself with a KQL summarize, so it comes back as one row per subscription. Docs: Working with large Resource Graph data sets.
  • Cost. --cost-scope reads 30 days of actual cost for every subscription in one paged query at billing account, billing profile, management group, EA department or enrollment account scope (5,000 rows a page). Cost Management allows each tenant 12 query units per 10 seconds, 60 a minute and 600 an hour, and a 30-day query uses about 2. The scan paces itself to 80% of that and backs off on throttling. Without a cost scope each subscription is queried on its own, which that quota limits to roughly 240 subscriptions an hour. Management group cost scope does not work for Microsoft Customer Agreement billing; use the billing account. Docs: Cost Management automation and limits, Understand and work with scopes.
  • Cost exports. --focus reads your Cost Management export files (FOCUS, actual or amortized cost, CSV, gzip accepted) from a local folder or from your storage account with your own login and Storage Blob Data Reader. Account keys, SAS tokens and connection strings are refused. --focus reads CSV and gzip CSV; Parquet exports are read on the report page in your browser.
  • Metrics. VM, scale set and storage metrics use the Azure Monitor batch API, up to 50 resources a call (same subscription, region and type). If a batch fails, the scan falls back to one call per resource. Microsoft bills metrics data plane and batch calls as metric queries. Docs: Metrics getBatch API.
  • Throttling. Every call is paced per API family and retried with exponential backoff on 429, 503, 504 and 529, honoring Retry-After. On Resource Graph and Cost Management calls the scan also reads the x-ms-user-quota-remaining and x-ms-user-quota-resets-after response headers and, when about 10% of the quota is left, waits for the reset instead of sending the next query. The quota is per user, so other tools using the same login can still cause a 429; the retry handles that. Docs: Guidance for throttled Resource Graph requests.
  • Browser files. The report page reads a CSV or a .csv.gz export as a stream in a background worker (the browser's own gzip decoder, no upload), and a .parquet export one row group at a time with only the columns the rules use (a bundled pure JavaScript reader, no download at run time) and adds each row into one running total per resource, so memory grows with the number of resources in the file, not its rows.
  • Where to run it. Cloud Shell ends a session after 20 minutes without input, so run a large estate from a VM or your own runner with the Azure CLI. Docs: Cloud Shell limitations.

What we measured. These are runs against a simulated estate (a fake az that enforces the same allowlist, paging, 50-resource batch limit and 1,000-subscription limit, with 5% of calls throttled), not a client tenant. Runs were on a shared 8 vCPU machine, so times vary.

RunResult
500 subscriptions, 100,500 resources, no added latencyCompleted with 0 errors. 15,742 az calls, cost read in 21 pages (42 query units), 195 MB peak memory. Same findings per kind as scanning each subscription on its own.
50 subscriptions, 10,050 resources, with per-call times measured on a real subscription149 seconds at --parallel 16, 297 seconds at the default 6. 1,600 az calls, 0 errors.
The h18 per-subscription pattern, same simulated subscriptionsAbout 146 seconds per subscription, one after another, and about 161 az calls per subscription.
Browser report, 500-subscription bundle (81.6 MB)Opened in under 1 second.
Browser report, synthetic .csv.gz export: 5 million rows, 166,666 resources, 132 MB gzipped (1.6 GB unzipped)29.2 seconds in headless Chrome. Browser page memory peaked at 1.3 GB, from 351 MB before the file. Memory follows the number of resources (here also 111,112 findings), not the file size.
Browser report, Microsoft's FOCUS 1.0 sample export from the FinOps toolkit, gzipped (18 MB, 135,272 rows)2.6 seconds. Browser page memory peaked at 444 MB, from 352 MB before the file.

Estimate, not measured: at the 50-subscription rate, 500 subscriptions would take roughly 25 minutes at --parallel 16. Each az call also costs about 0.3 seconds of CPU on the machine running the scan, so a small machine may be slower. Live checks so far are on one small Microsoft Customer Agreement account: cost at subscription, billing account and billing profile scope, Resource Graph paging, and batch metrics. Enterprise Agreement scopes and billing role assignment are built to Microsoft's documented APIs but not yet run against a live EA or business MCA account.

Area 1. Janitor sweeps

A disk or public IP is flagged when no VM, load balancer, gateway or firewall bills in the same resource group, or the disk name matches no VM. AKS-managed resources (MC_ groups, pvc- and kubernetes- names) are skipped. Snapshots billed all period are flagged for an age review. The scan also flags deallocated VMs that still pay for their disks. Savings estimate: the resource's own 30-day cost.

Microsoft docs: Find and delete unattached managed disks · Public IP addresses · Managed disk snapshots · VM states and billing

Area 2. Compute and AKS

VMs and scale sets tagged dev, test, qa, staging or similar (or in a resource group with such a name) that bill every day are assumed to move to a 60 hours a week schedule. The scan sizes VMs and AKS node pools from 30-day CPU P95 and maximum utilization, suggests the cluster autoscaler, and suggests Spot only for pools you mark fault tolerant.

Microsoft docs: VM auto-shutdown · Advisor rightsizing · AKS cluster autoscaler · AKS Spot node pools

Area 3. Logs and storage

When log ingestion is at least 8% of spend, 50% of ingestion is assumed movable to the Basic or Auxiliary table plans at about 75% lower price. Hot blob storage assumes 50% moves to Cool at about 45% lower storage price, through a lifecycle policy you can reverse.

Microsoft docs: Log Analytics table plans · Blob access tiers · Blob lifecycle management

Area 4. Rates and AI routing

A 1-year savings plan sized to the P10 daily baseline of steady on-demand compute, at an assumed 15% discount, so the commitment only covers usage you have every day. Commitments are never sized from under 30 days of data and always need finance sign-off. Model token spend assumes 20% is addressable by caching and smaller-model routing, behind an evaluation gate. PTU versus pay-as-you-go is not estimated without a price table agreed with you.

Microsoft docs: Azure savings plan for compute · Azure reservations · Prompt caching

Safety gates (scan)

Every scan finding gets a risk score from 1 (trivial, fully reversible) to 5 (financial commitment or reliability trade-off). A finding that fails any gate is held: it is listed with the reason, gets no fix script, and is left out of the savings total.

GateRule
G1 headroomMaximum utilization over 30 days must stay at or under 80% of the target size.
G2 historyAt least 30 days of data behind the finding.
G3 production rollbackResources tagged prod or critical need a tested rollback (tag finops-rollback-tested=true, set by you after a rehearsal).
G4 dependenciesEvery dependency the change could break was checked; anything unknown holds the finding.
G5 keep tagA do-not-delete, keep, retain or finops-ignore tag holds the finding.

How totals are kept honest

  • One resource cannot save more than it costs. The same rule twice on one resource counts once, and different rules on one resource are capped at that resource's monthly cost. Capped findings say so.
  • One-time purchase and refund rows (reservation or savings plan purchases) are left out of spend, because they are not monthly run-rate.
  • Costs in a CSV are scaled to a 30-day month from the billed days in the file. Under 7 days gives a warning.
  • CSV files with comma, semicolon or tab separators and decimal commas are read as such. Dates are read as ISO first; day/month order is taken from the data, and the report warns when it cannot tell.
  • Prices come from the public Azure Retail Prices API, list price, before any agreement discount. Docs: Azure Retail Prices API.

Access and revoking it

The free audit needs no access from us. Ongoing work uses a service principal with exactly three built-in read roles: Reader, Cost Management Reader and Monitoring Reader (Azure built-in roles). By default your team runs every fix. If you prefer that we apply one, you grant a time-limited role scoped to that single resource, and we remove it afterward. For a large estate the same roles can be granted once at a management group, plus a billing reader role on an EA or MCA billing account so cost is read in one query. Removing our access is one command per grant, printed by the onboarding script and shown on the security page (Remove Azure role assignments).

Verified savings

For each changed resource: its 30-day trailing cost before the change, minus its cost after the change in your own billing exports, net of any new cost the change adds. The exact method is written into the agreement before any work starts.

Open the free report Run the read-only scan