Imagine a small team on a pay-as-you-go Azure subscription. They set a $500 monthly budget with an alert at 100%, and they feel covered. Then, one Friday evening, a test environment gets scaled up for a load test and nobody scales it back, or a new Azure OpenAI integration gets stuck retrying the same long prompt. The resources run all weekend. The budget email arrives sometime after the money has already been spent, and nothing was switched off.
That's not a bug. An Azure budget is a notification rule, not a cap. Microsoft's budget tutorial says it plainly: "Resources aren't affected, and your consumption isn't stopped." On a pay-as-you-go subscription there's no switch that stops spending at a dollar amount. What you can build is a set of guardrails, each doing a different job: prevent expensive resources from being created, bound how far usage can grow, detect overspend, and respond to it. This article covers what budgets actually do, why their alerts arrive late, where a real spending limit exists, and how to put the layers together.
What an Azure budget actually does
A budget compares the cost at a scope with an amount you set for a period, and notifies people when thresholds are crossed. As of November 2026, the main pieces are:
- Thresholds on actual and forecast cost. You can set up to five thresholds on actual cost and five on forecast cost. A forecast alert fires when the projected cost for the period crosses the threshold, before the actual cost does.
- Notifications. Emails go to the addresses you list. If you create the budget through the Budgets API, you can also send alerts to people by Azure role; the tutorial notes that the portal doesn't support assigning roles.
- Scopes and periods. Budgets can be set on a management group, subscription, or resource group, and on billing scopes such as an Enterprise Agreement (EA) or Microsoft Customer Agreement (MCA) billing account. They reset monthly, quarterly, or annually.
- Actual cost, not amortized cost. The tutorial says "Budget cost evaluations are based on actual cost. They don't include amortization." A reservation bought upfront lands in the budget when it's charged, not spread across its term.
- Optional action groups. The Cost Management overview says subscription and resource group budgets can notify an action group "to take automated actions to reduce or even stop further charges." That's the only way a budget can lead to something being stopped, and it's limited: the tutorial notes that "Action groups are currently only supported for subscription and resource group scopes." A budget on a management group or billing account can email you, but it can't trigger automation.
Some subscription types can't use budgets at all. The overview says classic Cloud Solution Provider (CSP) and sponsorship subscriptions aren't supported in Cost Management.
Why the alert arrives after the money is spent
Budget alerts sit at the end of a chain of delays. Microsoft documents each step separately and doesn't publish a single end-to-end figure, so it helps to see them together. As of November 2026:
- Usage has to reach Cost Management first. The cost data documentation says data for EA and MCA subscriptions is "typically available in Cost Management within 8-24 hours," and that "For pay-as-you-go subscriptions, it could take up to 72 hours." Each service also emits usage on its own schedule.
- Budgets are evaluated once a day. The cost automation page says: "Your costs are evaluated against your budget threshold once per day."
- The email follows the evaluation. Microsoft's pages don't agree on how fast. The budget tutorial says emails are "normally sent within an hour of the evaluation," while the automation page says recipients get them "within 24 hours of crossing the budget threshold." Plan for the slower one.
- New budgets start empty. The automation page warns that when you create a budget, or on its reset day, the cost compared with the threshold "will be zero/null because the evaluation might not have occurred."
Put together, a resource that starts burning money on Friday evening can run through the weekend before the first alert, especially on pay-as-you-go. Forecast alerts help with steady growth, such as a database tier that's gradually getting more expensive, but they can't see a spike that hasn't reached the cost data yet.
The numbers inside the period are also estimates. The cost data page says open-month costs "don't consider tiered pricing plans" and are based on the highest tier for a product, and that "Costs are estimated until an invoice is generated and don't factor in credits." Taxes aren't included either, so a budget measures pre-tax cost. That matters for EU readers whose invoices include VAT.
Where a real spending limit exists, and where it doesn't
Azure does have a real cap, but only for some offers. The spending limit page describes it as on by default for the "Azure free account or subscription types that include credits over multiple months," such as Visual Studio subscriptions with monthly credits. As of November 2026, three rules apply:
- The limit equals the credit. "You can't change the amount of the spending limit," and "Custom spending limits aren't available."
- Pay-as-you-go can't have one. "The spending limit isn't available for subscriptions with commitment plans or with pay-as-you-go pricing."
- Hitting it is disruptive by design. Deployed services "are disabled for the rest of that billing period." Virtual machines "are stopped and de-allocated," storage data becomes read-only, and settings such as virtual IP addresses are lost.
Even this cap isn't complete. The page has a section titled "A spending limit doesn't prevent all charges," and lists examples billed outside it: "Visual Studio licenses, Microsoft Entra ID P1 or P2, support plans, and most third-party branded services." Some Marketplace services can charge separately even with the limit set.
So if you're on a free account or a monthly-credit subscription for learning and experiments, you already have a hard stop, with an outage attached. If you're on pay-as-you-go, EA, or MCA, you don't, and a budget won't give you one.
Turning an alert into an action
The documented way to make a budget do something is budget, then action group, then automation. Action groups can call an Automation runbook, a Function, a Logic App, or a webhook, and the action group page itself gives the example of a runbook that can "shut down resources when a certain threshold in the associated budget is met."
Microsoft's own budget automation scenario shows the pattern for "a customer running a noncritical workload": a $1,000 budget where a Logic App reads the alert, stops the virtual machines in a resource group named Optional at 80%, and stops all virtual machines at 100%. Use it as a pattern rather than a recipe. As of November 2026, the walkthrough still tells you to create an Azure Run As account, and the action groups page notes that Run As accounts were retired on 30 September 2023. Build the automation with a managed identity instead.
A few details will save you time:
- Test without waiting for a real threshold. Action groups have a Test feature, so you can trigger the automation before you rely on it.
- Verify email receivers. The action groups page says email receivers must be verified through a one-time passcode within 30 minutes, and unverified receivers don't get alert or test notifications once enforcement is active.
- Store the webhook URL when you create it. The scenario notes that once you create an Automation webhook, "you cannot view or retrieve the URL again."
- Check how the budget was created. In its PowerShell section for Enterprise Agreement customers, the budget tutorial notes that budgets created with PowerShell don't send notifications, and it recommends the REST APIs because command-line tools "might not support the latest version of the APIs." If you script budgets, use the current Cost Management budgets REST API (api-version 2025-03-01).
- Managed identity on action groups is still in preview for the runbook, Function, Event Hub, and Logic App actions, so check its status before depending on it.
The trade-offs matter more than the wiring:
- Overshoot is built in. The automation runs after the delay chain above, so it limits the damage. It doesn't prevent it.
- Stopping production is an outage. That's why Microsoft's example targets noncritical workloads. Scope automation with tags or resource groups to development, test, and sandbox environments.
- Stop or scale down; don't delete. Deleting resources from a budget alert is irreversible and can lose data. Stopping, deallocating, or scaling down can be undone.
- Make it safe to run twice. The action groups page says failed webhook calls are retried, and a budget with thresholds at 80% and 100% fires twice in the same period. A runbook may run against resources that are already stopped, and a stop that's safe to repeat is easier to trust.
"Stopped" doesn't always mean free
Even when automation works, some resources keep billing after you stop them. As of November 2026:
- Virtual machines. The VM states and billing page lists Stopped (allocated) as billed. That includes a shutdown from inside the guest OS. Deallocated isn't billed for compute, but "Some Azure resources, such as Disks and Networking continue to incur charges."
- App Service. The App Service pricing FAQ answers "Am I charged for apps while they are in stopped state?" with "Yes. Rates listed apply to apps in stopped state." The cost is the App Service plan. To stop paying, scale the plan down to the Free tier or delete what you no longer need.
- Azure SQL serverless. The serverless overview says that when a database is paused, "the compute cost is zero and only storage costs are incurred." Some features can prevent auto-pause, so check that it actually pauses.
- Container Apps. The scaling documentation says you aren't billed usage charges when an app scales to zero, but idle replicas "might be billed at a lower 'idle' rate."
- Azure OpenAI fine-tuned models. The Foundry cost page lists an hourly hosting cost per deployed fine-tuned model that "applies even if the model is unused."
If your automation stops an App Service app, or shuts a VM down without deallocating it, the budget keeps climbing and the alert keeps firing.
Anomaly alerts and the other alert types
Cost anomaly alerts are useful for catching what you didn't expect, but they aren't fast. The anomaly detection page says, as of November 2026:
- They compare each day's usage with a forecast based on the last 60 days.
- "Anomaly detection runs 36 hours after the end of the day (UTC)," so the data set is complete.
- "Anomaly alert rules can only be created at the subscription scope," with a limit of five per subscription.
- Alerts are delivered by email, once, at the time of detection. To automate a response, Microsoft's suggestions start from the mailbox, such as a Logic App watching for the alert email.
- They're "not available for Azure Government customers."
Cost Management also offers scheduled alerts, which email a saved cost view daily, weekly, or monthly, and invoice alerts for MCA and Microsoft Online Services Program subscriptions. The cost alerts overview lists credit alerts and department spending quota alerts as Enterprise Agreement features. A scheduled daily cost email is a cheap way to make spending visible to the team without waiting for a threshold.
Azure OpenAI and other usage-driven costs
AI services are where the gap between alert and spend hurts most, because usage can rise as fast as requests arrive. Microsoft is direct about it. The Foundry cost page says: "While OpenAI has an option for hard limits that prevent you from going over your budget, Azure OpenAI doesn't currently provide this functionality." That's current as of November 2026 and worth rechecking.
Two controls get mistaken for a cap:
- TPM quota is a rate limit, not a budget. The quota documentation says quota is assigned in tokens per minute, and when a deployment reaches its limit, "further requests receive an HTTP 429 response." A deployment can stay just under its rate limit all month and still produce a large bill.
- API Management can enforce a token quota per period. The llm-token-limit policy can limit tokens to a rate, "a quota over a specified period, or both," with hourly, daily, weekly, monthly, or yearly periods. Callers get a 403 once the quota is exceeded. It's the closest thing to a usage cap for model calls, with two caveats from the policy page: "concurrent or near-concurrent requests can temporarily exceed the configured token limit," and it doesn't aggregate counts across all gateways in an instance.
If your app calls Azure OpenAI through API Management, a token quota per client or per environment bounds usage in a way a budget can't.
Guardrails that work before the bill: a layered setup
No single feature stops spending on a pay-as-you-go subscription, so combine layers that each do one job:
- Prevent. Use Azure Policy to restrict what can be created. Microsoft's VM cost guidance suggests the "Allowed virtual machine SKUs" policy to restrict sizes "that exceed your desired budget," noting that it needs updates as new SKUs appear. Limit who can create resources at all with RBAC.
- Bound. Set ceilings on how far usage can grow. App Service scale-out tops out at 3, 10, or 30 instances on Basic, Standard, and Premium plans according to its scale-up documentation, and you can set a lower autoscale maximum. Container Apps has a configurable maximum replica count. For AI calls, use TPM quotas and an API Management token quota.
- Detect. Set budgets with both actual and forecast thresholds, on subscriptions and on the resource groups that matter, plus anomaly alerts on each subscription. Send them to a shared inbox or a team channel, not one person.
- Respond. Attach automation to budgets on non-production scopes, using stop, deallocate, or scale-down actions that are safe to run twice.
- Organize. Tag resources by environment and owner so budgets and automation can target the right things. Tags aren't inherited from resource groups unless you enable tag inheritance in Cost Management.
Two regional details are worth knowing. For an MCA billing account, the budget tutorial says budget evaluation "uses USD currency, regardless of the billing currency," and budgets across multiple currencies aren't supported, so alerts can be missed. EU teams billed in euros should check which scope their budgets sit on. And because Cost Management excludes taxes, a budget set to your expected invoice total including VAT only alerts once pre-tax spend reaches that figure. Set the amount on a pre-tax basis.
A budget guardrail checklist
- Know whether your subscription has a real spending limit. Free accounts and monthly-credit offers do; pay-as-you-go, EA, and MCA don't.
- Treat budgets as notifications. Assume alerts can arrive a day or more after the spend, longer on pay-as-you-go.
- Add forecast thresholds alongside actual-cost thresholds.
- Put budgets on subscriptions and resource groups if you want automation, because only those scopes support action groups.
- Verify email receivers and test the action group before you rely on it.
- Build automation with managed identity, not Run As accounts, and scope it to non-production with tags.
- Stop, deallocate, or scale down. Don't delete from an alert.
- Check what still bills after a stop: App Service plans, allocated VMs, disks, paused SQL storage, and fine-tuned model hosting.
- Turn on anomaly alerts per subscription and a scheduled daily cost email.
- Restrict expensive SKUs with Azure Policy, and limit who can create resources.
- Cap scale-out and replica counts, and put an API Management token quota in front of AI model calls.
- For an MCA billing account, remember that budgets evaluate in USD and exclude taxes.



