How do I set budgets in Azure and trigger an action when a threshold is met?

Create and manage Azure budgets

Budgets in Cost Management help you plan for and drive organizational accountability. With budgets, you can account for the Azure services you consume or subscribe to during a specific period. They help you inform others about their spending to proactively manage costs, and to monitor how spending progresses over time. When the budget thresholds you've created are exceeded, only notifications are triggered. None of your resources are affected and your consumption isn't stopped. You can use budgets to compare and track spending as you analyze costs.

Monthly budgets are evaluated against spending every four hours. However, data and notifications for consumed resources are available within eight hours.

Budgets reset automatically at the end of a period (monthly, quarterly, or annually) for the same budget amount when you select an expiration date in the future. Because they reset with the same budget amount, you need to create separate budgets when budgeted currency amounts differ for future periods.


Create a budget in the Azure portal

You can create an Azure subscription budget for a monthly, quarterly, or annual period. Your navigational content in the Azure portal determines whether you create a budget for a subscription or for a management group.

  1. Open the desired scope(subscription) in the Azure portal

  2. Select Budgets in the menu.

  3. Use the Scope pill to switch to a different scope, like a management group, in Budgets.
  4. Click Add.
  5. In the Create budget window, enter a budget name and budget amount. Then, choose either a monthly, quarterly, or annual duration period. Next, select an end date. Budgets require at least one cost threshold (% of budget) and a corresponding email address. You can optionally include up to five thresholds and five email addresses in a single budget. When a budget threshold is met, email notifications are normally received in less than eight hours. If you have a Pay-As-You-Go, MSDN, or Visual Studio subscription, your invoice billing period might not align to the calendar month. For those types of subscriptions and resource groups, you can create a budget that's aligned to your invoice period or to calendar months. To create a budget aligned to your invoice period, select a reset period of Billing month, Billing quarter or Billing year. To create a budget aligned to the calendar month, select a reset period of Monthly, Quarterly or Annually. Here's an example of creating a monthly budget for $4,500. An email alert gets generated when 90% of the budget is reached.



When you create a quarterly budget, it works in the same way as a monthly budget. The difference is that the budget amount for the quarter is evenly divided among the three months of the quarter. As you might expect, an annual budget amount is evenly divided among all 12 months of the calendar year.

Current spending against budgets is updated whenever Cost Management receives updated billing data. Typically, daily.


After you create a budget, it is shown in cost analysis. Viewing your budget in relation to your spending trend is one of the first steps when you start to analyze your costs and spending.



Edit a budget

Depending on the level of access that you have, you can edit a budget to change its properties. In the following example, some of the properties are read-only because the user has only Contributor permission to the subscription. Currently, the Expiration date is disabled and can't be modified once set.


  1. Open the desired scope(subscription) in the Azure portal

  2. Select Budgets in the menu.


  1. Click on the budget you just created.

  2. Click on Edit budget.

  3. Add another alert percentage of 80%

  4. Click save.

Trigger an action group

When you create or edit a budget for a subscription or resource group scope, you can configure it to call an action group. The action group can perform a variety of different actions when your budget threshold is met.

To create or update action groups:


  1. On the edit budget screen, click Manage action groups.

  2. Click Add action group

  3. Create the action group. Enter Test Action Group for the name and Test for the Short name and be sure to select your subscription. The Short name will be included in any email or SMS message sent. Also, select the resource group you’ve been using for the rest of the lab.

  4. After the action group is created, close the box to return to your budget.
  5. Configure your budget to use your action group when an individual threshold is met. Up to five different thresholds are supported.



Article ID: 984
Fri 1/15/21 6:18 PM
Wed 9/15/21 8:32 PM

Related Services / Offerings (1)

Microsoft Azure is an ever-expanding set of cloud services to help UIC innovate and meet your organizational needs. It’s the freedom to build, manage, and deploy applications on a massive, global network using your favorite tools and frameworks.