Azure cost alerts

How to set up Azure budget alerts and why they fire late

Azure cost alerts fire late because Azure processes cost and usage data on an 8 to 24 hour delay - stretching up to 72 hours on pay-as-you-go subscriptions - and only evaluates budgets once every 24 hours. When you cross a threshold, an email normally arrives within an hour of that daily check, but your resources keep running and spending money because an Azure budget does not stop consumption.

If you spun up an oversized cluster this morning, your budget alert won't warn you this afternoon. By the time the email lands, you're paying for yesterday's run plus whatever piled up while the billing pipeline crunched your meters. Here is how the evaluation loop works, how to set up actual and forecasted budget alerts in the portal, and what you can do when you need resources to actually stop.

Why Azure budget alerts fire late

The delay comes from a two-stage pipeline: data ingestion and budget evaluation.

First, your usage has to reach Azure Cost Management. Different Azure services emit usage at different intervals, so you'll see compute, storage, and SQL numbers show up at different times. Estimated charges for your current billing period are updated six times per day, but that doesn't mean the data is complete. For Enterprise Agreement (EA) and Microsoft Customer Agreement (MCA) accounts, cost and usage data is typically available within 8 to 24 hours. If you're on a standard web direct pay-as-you-go subscription, it can take up to 72 hours for your cost and usage data to show up. And when your billing period ends, Azure typically finalizes charges up to 72 hours later, with charges continuing to accrue or change until the fifth day.

Second, Azure doesn't evaluate budgets continuously. Budgets are evaluated against these costs once every 24 hours.

Usage occurs -> Meter data emitted (8 to 72 hours) -> Daily evaluation (every 24 hours) -> Email sent (within 1 hour)

When you meet or exceed a threshold during that daily pass, email notifications are normally sent within an hour of the evaluation. If you introduce a runaway loop on Monday at 9:00 AM, the usage might not hit Cost Management until Tuesday morning, or Wednesday if you're on pay-as-you-go. The evaluator runs its 24-hour pass, notices the overage, and sends an email an hour later. That is how a budget alert ends up landing two or three days after the spending happened.

Also keep in mind that if you just activated a new subscription, you can't jump in immediately. It can take up to 48 hours before you can create a budget or use any Cost Management features at all.

Step-by-step: Creating an Azure budget alert in the portal

In the Azure portal, budgets are strictly defined by cost, whereas the underlying Azure Consumption API lets you define budgets by either cost or consumption usage.

To set up a budget on a resource group:

  1. Open the Azure portal and go to Cost Management + Billing.
  2. Select Subscriptions, pick your subscription, and click Resource groups.
  3. Select your resource group, select Budgets in the left menu, and click Add.
  4. Set a name and pick your reset period. Pay-as-you-go subscriptions can align to calendar periods (Monthly, Quarterly, Annually) or invoice periods (Billing month, Billing quarter, Billing year). If you pick quarterly, Azure divides the total amount evenly across the three months; if you pick annual, it divides it evenly across all 12 calendar months.
  5. Set an expiration date. Budgets automatically reset at the end of their period for the same budget amount as long as the expiration date is in the future. Once a budget expires, Azure automatically deletes it.
  6. Choose your filters. Azure budget evaluations include reserved instances and purchase data based on actual cost, without amortization. If you want the budget to evaluate against first-party consumption charges only, add two filters: Publisher Type: Azure and Charge Type: Usage.
  7. Configure your alert conditions. Budgets require at least one cost threshold and one recipient email address. You can set up to five thresholds and five email addresses per budget, with threshold percentages ranging from 0.01% to 1000%.
  8. Add azure-noreply@microsoft.com to your email allowlist so the notification doesn't drop into your spam folder.

Keep in mind that estimated costs shown in Cost Management during an open month don't consider tiered pricing plans. They calculate estimates based on the highest tier for the product, and leave out support charges, taxes, and credits until the invoice generates.

Actual vs forecasted thresholds

When you configure an alert threshold, use the Type field to toggle between an Actual and a Forecasted alert.

An actual cost alert fires only after your recorded spend crosses the percentage you picked. Because of the 8 to 72 hour data delay, actual alerts are backward-looking retrospectives. They tell you that you've already spent the money.

A forecasted alert fires when Azure's consumption model projects that your spending will pass your threshold by the end of the budget period. Notifications for forecasted thresholds are also sent within an hour of the daily evaluation. If you want a warning before the bill arrives, set a forecasted threshold at 100% alongside an actual threshold at 80%. If your pace spikes early in the month, the forecasted evaluation can catch the trend days before your actual spending hits the ceiling. If you need broader visibility into month-end numbers, see our guide on how to forecast your cloud bill before the month ends.

Beyond standard budgets, Cost Management provides cost anomaly alerts to notify you automatically when unusual spending patterns show up, alongside credit alerts and department spending quotas for larger enterprise setups.

Stopping resources: Action groups and CLI automation

Exceeding an Azure budget threshold triggers an email, but it does not affect your running resources and it doesn't stop consumption. If you need workloads to shut down to prevent further billing, you have to attach an action group.

Action groups on Azure budgets are currently supported only for subscription and resource group scopes. You can integrate them whether the common alert schema is enabled or disabled. However, there is a major tooling trap to avoid: budgets created with the Azure PowerShell module (New-AzConsumptionBudget) do not send notifications. Microsoft recommends using the REST APIs or Azure CLI instead. Customers on a Microsoft Customer Agreement should use the Budgets REST API directly to build budgets programmatically.

If you use the Azure CLI, you can create a resource group budget wired to an action group in one command using az consumption budget create-with-rg:

az consumption budget create-with-rg \
  --amount 100 \
  --budget-name TestCLIBudget \
  -g $rg \
  --category Cost \
  --time-grain Monthly \
  --time-period '{"start-date":"2024-06-01","end-date":"2025-12-31"}' \
  --notifications "{\"Key1\":{\"enabled\":\"true\", \"operator\":\"GreaterThanOrEqualTo\", \"contact-emails\":[], \"threshold\":80.0, \"contact-groups\":[\"$ActionGroupId\"]}}"

To see whether a hard cap exists without custom automation, read our breakdown on whether Azure has a spending limit.

Scopes, permissions, and alert types compared

Azure budgets work across various Azure RBAC scopes (Management group, Subscription, Resource group) and Enterprise Agreement scopes (Billing account, Department, Enrollment account). But scope setup has strict rules. For example, multi-currency budget evaluations are not supported. All subscriptions inside a scope like a management group must operate under a single currency, or your budget evaluations can fail and miss alerts entirely.

For Microsoft Customer Agreement scopes, budget evaluation at the billing account scope always uses USD regardless of your billing currency (unless you are in sovereign clouds like China 21V, which uses billing currency). Billing profile, invoice section, and customer scopes evaluate in the billing currency.

Permissions are split cleanly across RBAC roles:

  • Owner: Can create, modify, or delete budgets at the subscription level, and has Read and Update permissions on cost alerts.
  • Contributor & Cost Management Contributor: Can create, modify, or delete their own budgets, modify the spending amount on budgets created by others, and read or update cost alerts.
  • Reader & Cost Management Reader: Can view budgets and have read-only access to cost alerts.

To view your active alerts in the portal, open your scope, click Budgets, and then click Cost alerts. Alerts show a status of either active or dismissed, and you can reactivate a dismissed alert from its details pane.

Alert typeEnterprise AgreementMicrosoft Customer AgreementWeb direct / Pay-As-You-GoTrigger criteria
BudgetSupportedSupportedSupportedActual or forecasted cost crosses a set limit (0.01% to 1000%)
CreditSupportedNot supportedNot supportedAutomatic at 90% and 100% of Azure Prepayment credit balance
Department spending quotaSupportedNot supportedNot supportedFixed spending threshold reached (configured in portal, e.g., 50% or 75%)

If you assign roles to people to receive budget alerts, keep in mind that role-based alert recipients are only supported when creating a budget through the Budgets API; the Azure portal does not support assigning alert recipients by role.

Live monitoring and brakes with Costbrake

If an 8 to 72 hour reporting delay leaves your budget exposed, you can supplement Azure Cost Management with Costbrake.

Costbrake watches your spending across 23 cloud, AI, and SaaS providers, including Azure, AWS, GCP, Cloudflare, OpenAI, and Anthropic. For Azure, Costbrake reads Cost Management data (which posts 8 to 72 hours late and is treated as final after 4 days) and pairs it with live resource metrics from Azure Monitor. Live estimates pull token usage from Azure OpenAI and AI Services accounts at list price, track provisioned throughput unit hours, and monitor allocated VMs at their hourly rate from the moment they are discovered.

Checks run hourly on the Free plan ($0 for 2 connections and 3 budgets), every 5 minutes on Pro ($12/month for 10 connections, 50 budgets, Slack, Discord, webhooks, and brakes), and every 2 minutes during an active spike. A spike alert fires when an hour costs more than 3x the 7-day hourly baseline and at least $5 more than usual.

Costbrake also gives you an opt-in, reversible killswitch called brakes on Pro and Team plans. A brake never runs on its own; an admin must click and confirm it in the dashboard. For Azure, Costbrake supports two specific brakes:

  • Deallocate VM: Shuts down the virtual machine and releases the underlying hardware so compute billing stops immediately. Disks and settings remain intact, though storage disks continue to bill at their standard rates.
  • Turn off API keys: Sets disableLocalAuth on an Azure OpenAI or AI Services account, refusing all callers attempting to authenticate with API keys while leaving Entra ID authentication active. If you manage heavy model traffic, take a look at our walkthrough on keeping Azure OpenAI spend under control.

Connecting Azure takes read-only credentials with Cost Management Reader and Monitoring Reader roles via an app registration with federated credentials, meaning no secret keys are stored. You can set it up via our agent setup or connect manually in the dashboard. For full plan details, see our Costbrake pricing page.

Questions and answers

Can an Azure budget alert stop my virtual machines automatically?

No. Azure budget alerts only trigger notifications and do not affect running resources or stop consumption. To shut down resources when a budget is exceeded, you must attach an action group to your budget at the subscription or resource group scope.

How often does Azure evaluate budgets?

Azure evaluates budgets against your cost data once every 24 hours. When a budget threshold is exceeded during an evaluation, notification emails are typically sent within an hour.

Why did I get a budget alert days after turning off my resources?

Azure cost and usage data takes 8 to 24 hours to appear for Enterprise Agreement and Microsoft Customer Agreement subscriptions, and up to 72 hours for pay-as-you-go subscriptions. Because budgets evaluate every 24 hours against posted data, an alert will often arrive two to three days after the actual spending occurred.

How long does Azure retain my cost data?

Cost Management retains cost and usage data for at least seven years. Azure portal features like Cost Analysis and the Cost Details API display the last 13 months of data, while older historical records can be pulled using the Exports REST API.

Can I set budget alerts using Azure PowerShell?

You should not use the Azure PowerShell module (New-AzConsumptionBudget) for alerts because budgets created with it do not send notifications. Use the Azure portal, the Azure CLI, or the Budgets REST API to create budgets that require alerts.

Sources

Updated