AZ-104Chapter 56 of 168Objective 1.2

Azure Cost Management and Budgets

This chapter covers Azure Cost Management and Budgets, a critical domain for the AZ-104 exam under Objective 1.2 (Manage Azure identities and governance). You will learn how to monitor, allocate, and control Azure spending using native tools like Cost Analysis, Budgets, and Alerts. Approximately 10-15% of exam questions touch cost management topics, often integrated with governance scenarios involving management groups, tags, and policies. Mastering this content ensures you can design cost-effective Azure solutions and answer scenario-based questions confidently.

25 min read
Intermediate
Updated May 31, 2026

Azure Cost Management as a Corporate Expense System

Azure Cost Management and Budgets work like a corporate expense management system. Imagine a company where each department has a budget (cost budget), and they get alerts when spending approaches the limit (budget alerts). The finance team sets up cost centers (management groups, subscriptions, resource groups) and tracks spending using a detailed chart of accounts (cost analysis). They can also set up automated rules: when a department overspends, the system automatically restricts further purchases (automated actions like disabling resources). The finance team uses tags (like cost center or project code) to allocate costs precisely. They generate reports (export to storage account) for auditing. If a team overspends, the budget alert triggers an email to the manager, who can then drill into cost analysis to see which resources caused the spike. This mirrors Azure's mechanism: budgets monitor cost or usage at scope, trigger alerts at thresholds (e.g., 90% of budget), and can invoke action groups to send email/SMS or run automation runbooks. Cost analysis provides multi-dimensional breakdowns (by resource, service, location, tag). Exports to storage or Power BI enable long-term analysis. Just as a corporate system prevents unchecked spending, Azure Cost Management enforces financial governance.

How It Actually Works

What is Azure Cost Management?

Azure Cost Management is a suite of tools provided by Microsoft to help you plan, analyze, and control your Azure spending. It is part of the Microsoft Cost Management product, which also covers other cloud services. The core components are: - Cost Analysis: Interactive views of your costs aggregated by various dimensions (subscription, resource group, resource, meter, service, location, tag, etc.). - Budgets: Set spending limits with alerts and automated actions. - Alerts: Notifications triggered by budget thresholds or anomaly detection. - Exports: Schedule exports of cost data to Azure Storage or to Power BI for custom reporting. - Advisor Recommendations: Cost optimization suggestions from Azure Advisor.

Cost Management is available at multiple scopes: Billing account, Department, Enrollment Account, Management Group, Subscription, and Resource Group. The data is sourced from Azure Resource Manager and is typically available within 8-24 hours (though some real-time data may be delayed).

How Cost Management Works Internally

Azure collects usage and cost data from all resource providers (e.g., compute, storage, network). This data flows into the billing system, which applies rates from your price sheet (Pay-As-You-Go, Enterprise Agreement, or Microsoft Customer Agreement). The cost data is then aggregated and made available via the Cost Management APIs and the Azure portal. Key internal processes: - Metering: Each resource emits usage records (e.g., VM hours, storage GB) to the Azure Metering service. - Rating: The billing system applies the appropriate rate based on the meter, subscription offer type, and any negotiated discounts. - Cost Allocation: Tags are used to allocate costs to departments or projects. Cost allocation rules can also be set up in Cost Management to redistribute costs (e.g., shared IT costs). - Data Latency: Most cost data appears within 8 hours, but some charges (like support or reservations) may take up to 48 hours. Budget alerts may have up to 2-hour latency.

Key Components, Values, Defaults, and Timers

Scopes: Cost Management can be viewed at the Billing Account (EA or MCA), Department, Enrollment Account, Management Group, Subscription, Resource Group, or Resource level. The default scope in the portal is the current context (e.g., subscription).

Budgets: You can create a budget at any scope. Budgets can be based on actual cost or forecasted cost. You set a budget amount (e.g., $1000) and up to 5 alert thresholds (e.g., 50%, 90%, 100% actual, 120% forecast). Alerts can trigger an action group (email, SMS, webhook, Azure Function, etc.).

Budget Reset: Budgets can be set to reset monthly, quarterly, or annually. The budget period starts on the first day of the period.

Cost Analysis Defaults: The default view shows accumulated costs for the current month. You can group by resource type, location, or tags. You can also filter by specific resources or resource groups.

Export: You can export cost data to a storage account (Azure Blob or ADLS Gen2) on a daily, weekly, or monthly schedule. The export uses a CSV file with detailed cost data.

Anomaly Alerts: Cost Management can detect anomalies (unexpected spikes) and send alerts via email. This feature must be enabled in the Cost Management settings.

Pricing: Cost Management itself is free, but storage costs for exports, action group notifications (if using SMS), and Azure Functions (if triggered) may incur charges.

Configuration and Verification Commands

You can manage budgets and cost management using Azure CLI, PowerShell, or REST API. Common commands:

Azure CLI - List budgets: az consumption budget list --scope /subscriptions/{subscriptionId} - Create a budget: az consumption budget create --budget-name myBudget --amount 1000 --time-grain monthly --time-period start-date=2023-01-01 end-date=2023-12-31 --scope /subscriptions/{subscriptionId} - Add alert threshold: az consumption budget create ... --notifications actual-cost-greater-than-90=90,enabled,email,admin@contoso.com - List cost exports: az billing export list --scope /subscriptions/{subscriptionId}

PowerShell - Get cost data: Get-AzConsumptionBudget -SubscriptionId {subscriptionId} - Create budget: New-AzConsumptionBudget -Name myBudget -Amount 1000 -TimeGrain Monthly -StartDate 2023-01-01 -EndDate 2023-12-31 -SubscriptionId {subscriptionId} - Add notification: New-AzConsumptionBudget -Name myBudget ... -NotificationKey actual_90 -NotificationOperator GreaterThan -NotificationThreshold 90 -ContactEmails admin@contoso.com

Verification: Check budget status in the portal under Cost Management > Budgets. The status shows whether the budget is active or exceeded. Use Cost Analysis to verify costs are being tracked.

Interaction with Related Technologies

Azure Policy: Use policy to enforce tags (e.g., require CostCenter tag) which are then used in cost analysis. Policy can also be used to restrict resource creation based on budget.

Management Groups: Use management groups to aggregate costs across subscriptions and set budgets at the management group scope.

Action Groups: Budget alerts can trigger action groups, which can send email, SMS, or run an automation runbook (e.g., to shut down VMs when budget is exceeded).

Azure Advisor: Advisor provides cost optimization recommendations (e.g., right-size VMs, delete idle resources). These recommendations appear in Cost Management.

Power BI: Export cost data to a storage account and use Power BI to create custom dashboards. The Cost Management connector for Power BI is also available.

Azure Reservations: Cost Management shows reservation utilization and savings. Budgets can be set on reservation costs.

Common Exam Scenarios

Tag inheritance: Tags applied to a resource group are not automatically inherited by resources. You must apply policy to enforce inheritance.

Budget scope: Budgets can be set at management group, subscription, resource group, or resource scope. The exam may ask which scopes are valid.

Alert thresholds: You can have up to 5 alert conditions per budget. Thresholds can be based on actual cost or forecasted cost.

Export format: Exports can be in CSV or Parquet format (for ADLS Gen2). The export includes cost and usage data.

Anomaly detection: Must be enabled manually. It uses machine learning to detect unusual spending patterns.

Cost allocation: Allows you to split shared costs (e.g., a shared SQL server) among multiple cost centers using percentages.

Walk-Through

1

Enable Cost Management Access

To use Cost Management, you need appropriate RBAC permissions. At the subscription scope, you need Cost Management Reader (read-only) or Cost Management Contributor (create budgets, exports). At the management group scope, you need Reader or Contributor at that scope. For EA billing accounts, you need Enterprise Administrator or Department Administrator. For MCA, you need Billing Account Contributor or Billing Profile Contributor. The exam may test which role is needed to create budgets.

2

Configure Cost Analysis Views

Navigate to Cost Management > Cost Analysis. By default, you see accumulated costs for the current month. You can switch to daily or monthly granularity. Use the 'Group by' option to break down costs by resource type, location, or custom tags. Use filters to narrow down to specific resource groups or services. You can also save custom views for reuse. The exam expects you to know how to troubleshoot cost spikes by drilling into dimensions.

3

Create a Budget with Alerts

Go to Cost Management > Budgets > Add. Select a scope (e.g., subscription). Set the budget amount and time period (monthly, quarterly, annual). Add alert conditions: e.g., when actual cost reaches 90% of budget, send email to admin. You can add up to 5 conditions. Optionally, set a condition on forecasted cost (e.g., 120% of budget). Under 'Actions', you can select an action group to trigger automated responses (e.g., run a runbook to deallocate VMs). The exam may test that budgets can be set at management group scope and that alerts can trigger action groups.

4

Set Up Cost Exports

To export cost data, go to Cost Management > Exports > Add. Choose a scope, specify a storage account and container, and select the export type (Daily export of month-to-date costs or Monthly export of last month's costs). You can also choose the file format (CSV or Parquet). Exports are incremental for daily exports. The exam may ask about export schedules and that exports can be used for custom reporting in Power BI.

5

Enable Anomaly Detection Alerts

In Cost Management > Anomaly detection (under Settings), toggle on anomaly alerts. You must have at least one subscription active. Anomaly detection uses machine learning to model normal spending patterns and alerts you when spending deviates significantly. Alerts are sent via email to subscription owners. The exam may test that this feature is not enabled by default and that it requires specific permissions.

6

Review Advisor Cost Recommendations

Azure Advisor provides cost optimization recommendations based on your usage. In Cost Management, you can view these recommendations under 'Advisor recommendations'. Common recommendations include: right-size or shut down underutilized VMs, purchase reserved instances, delete idle resources, and configure auto-shutdown. The exam may test that Advisor recommendations are not automatically applied; you must review and implement them manually.

What This Looks Like on the Job

Enterprise Scenario 1: Multi-Subscription Cost Allocation

A large enterprise with 50 subscriptions across multiple departments uses management groups to organize by business unit (e.g., Marketing, R&D, IT). They need to allocate costs to each department accurately. They enforce a policy that requires a 'CostCenter' tag on all resources. In Cost Management, they create budgets at the management group scope for each department. They use cost analysis grouped by tag to generate monthly reports. They export cost data to a central storage account for integration with their finance system. Common issues: missing tags cause unallocated costs; they use a policy to enforce tags. The exam may test tag inheritance and how to handle untagged resources.

Enterprise Scenario 2: Automated Budget Enforcement

A startup wants to prevent accidental overspending. They set a monthly budget of $5,000 at the subscription level with alerts at 80%, 90%, and 100%. At 100%, the budget triggers an action group that runs an Azure Automation runbook to deallocate all non-production VMs. They also set up anomaly detection to catch unexpected spikes (e.g., a DDoS attack causing high data transfer). In production, they learned that budget alerts have up to 2-hour latency, so they also set up a separate logic app to monitor real-time cost anomalies via the API. The exam may test that budget alerts are not real-time and that automated actions require action groups.

Enterprise Scenario 3: Reserved Instance Cost Management

A company purchases 3-year reserved instances for VMs. They need to track utilization and savings. In Cost Management, they view 'Reservation utilization' reports to ensure they are using at least 80% of the reserved capacity. They set budgets on the reservation charges to avoid surprises when reservations expire. They also use cost analysis to compare pay-as-you-go vs. reserved costs. Common misconfiguration: not assigning reservations to a specific subscription scope, causing costs to be spread incorrectly. The exam may test that reservation costs appear in cost analysis and that budgets can be set on reservation charges.

How AZ-104 Actually Tests This

AZ-104 Exam Focus on Cost Management and Budgets

Objective 1.2: Manage Azure identities and governance includes subtopics: manage Azure costs via budgets, alerts, and cost analysis. Expect 2-4 questions on this topic. The exam tests your ability to:

Identify the correct scope for budgets (management group, subscription, resource group).

Understand budget alert thresholds (up to 5, based on actual or forecasted cost).

Know that budgets can trigger action groups (email, SMS, webhook, runbook).

Recognize that cost analysis data can be grouped by tags, resource type, location, etc.

Know how to export cost data to a storage account.

Understand that anomaly detection is not enabled by default.

Common Wrong Answers and Why

1.

"Budgets can be set only at subscription scope." Wrong: Budgets can be set at management group, subscription, resource group, or resource scope. Candidates choose subscription because it's the most common.

2.

"Budget alerts are real-time." Wrong: Alerts have up to 2-hour latency. Candidates assume alerts are immediate like Azure Monitor alerts.

3.

"Cost analysis data is available instantly." Wrong: Data latency is 8-24 hours. Candidates confuse with Azure Monitor metrics.

4.

"Tags are automatically inherited from resource groups." Wrong: Tags are not inherited; you must use Azure Policy to enforce inheritance.

Specific Numbers and Terms

Budget thresholds: up to 5 per budget.

Budget reset: monthly, quarterly, or annual.

Export schedule: daily or monthly.

Data latency: 8-24 hours for most data; budget alerts up to 2 hours.

Anomaly detection: must be enabled manually.

Cost Management roles: Cost Management Reader, Contributor.

Edge Cases and Exceptions

Management group budgets: Budgets at management group scope include costs from all child subscriptions. If a subscription is moved out, the budget does not automatically adjust.

Forecasted cost alerts: You can set alerts on forecasted cost exceeding budget (e.g., 120% of budget). This uses machine learning.

Action groups: Budget alerts can trigger action groups, but the action group must exist in the same Azure AD tenant.

Export to storage: The storage account must be in the same region as the billing account? No, it can be in any region.

How to Eliminate Wrong Answers

If a question asks about setting budgets for multiple subscriptions, consider management group scope.

If a question mentions real-time cost monitoring, look for a trick: cost management is not real-time.

If a question involves tag-based cost allocation, remember that tags must be enforced via policy.

If a question mentions automated actions on budget breach, the answer must involve action groups.

Key Takeaways

Budgets can be set at management group, subscription, resource group, or resource scope.

Up to 5 alert thresholds per budget, based on actual or forecasted cost.

Budget alerts can trigger action groups (email, SMS, webhook, runbook).

Cost analysis data has 8-24 hour latency; budget alerts up to 2 hours.

Anomaly detection must be enabled manually; not default.

Cost exports to storage account support CSV and Parquet formats.

Tags are not inherited; use Azure Policy to enforce inheritance.

Cost Management Reader role is needed to view costs; Contributor to create budgets/exports.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Budgets

Monitors spending and sends alerts at thresholds.

Can trigger automated actions via action groups.

Scope: management group, subscription, resource group, resource.

Not real-time; latency up to 2 hours.

Used for cost control, not resource compliance.

Azure Policy

Enforces rules on resource configurations (e.g., allowed regions).

Can automatically remediate non-compliant resources.

Scope: management group, subscription, resource group.

Real-time enforcement on resource creation/update.

Used for governance, security, and compliance.

Watch Out for These

Mistake

Cost Management data is real-time.

Correct

Cost data has a latency of 8-24 hours. Budget alerts may have up to 2 hours delay. Use Azure Monitor for near-real-time metrics.

Mistake

Budgets can only be created at the subscription level.

Correct

Budgets can be created at management group, subscription, resource group, and resource scopes. The scope determines which costs are monitored.

Mistake

Tags applied to a resource group are automatically inherited by resources.

Correct

Tags are not inherited from resource groups. You must use Azure Policy to enforce tag inheritance or apply tags directly to resources.

Mistake

Anomaly detection alerts are enabled by default.

Correct

Anomaly detection must be manually enabled in Cost Management settings. It is not active by default.

Mistake

Exporting cost data to a storage account is free.

Correct

Cost Management itself is free, but the storage account used for exports incurs standard storage costs.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between actual cost and forecasted cost in Azure budgets?

Actual cost is the real spending incurred so far in the budget period. Forecasted cost is an estimate of what the total cost will be by the end of the period, based on current spending patterns. Budgets can trigger alerts when actual cost exceeds a threshold (e.g., 90%) or when forecasted cost exceeds a threshold (e.g., 120%). Forecasted cost uses machine learning and is available only for subscriptions with sufficient history. The exam may test that you can set alerts on both actual and forecasted costs.

Can I create a budget for a specific resource group?

Yes, you can create a budget at the resource group scope. This is useful for monitoring costs of a specific project or team. The budget will only include costs from resources within that resource group. However, note that some costs (e.g., support charges) may not be associated with a specific resource group and will not be included. The exam may test that budgets can be scoped to resource groups and that the scope determines which costs are monitored.

How do I automate cost savings when a budget is exceeded?

You can configure a budget alert to trigger an action group that runs an Azure Automation runbook. For example, the runbook can deallocate VMs or delete non-critical resources. To do this, create an action group with a 'Runbook' action type, specifying the runbook name and webhook data. Then, in the budget alert, select that action group. Note that the action group must exist in the same Azure AD tenant. The exam may test that automated actions require action groups and that runbooks can be triggered.

Why is my cost analysis data not showing any costs?

Possible reasons: (1) You don't have the Cost Management Reader role at the appropriate scope. (2) The subscription is new and has no usage yet. (3) You are looking at the wrong time period (e.g., future date). (4) Data latency: costs may take up to 24 hours to appear. Check your RBAC permissions and ensure the subscription has active resources. The exam may test that cost data is not real-time and that permissions are required.

Can I export cost data to a storage account in a different subscription?

Yes, you can export cost data to a storage account in any subscription, as long as the user has appropriate permissions (Contributor or Owner on the storage account). The export uses a managed identity or storage account key for authentication. However, the storage account must be in the same Azure AD tenant. The exam may test that cross-subscription exports are possible but require proper RBAC.

What is the difference between Cost Management and Azure Advisor for cost optimization?

Cost Management provides tools to monitor, analyze, and control costs (budgets, exports, cost analysis). Azure Advisor provides specific recommendations to optimize costs (e.g., right-size VMs, purchase reservations). Cost Management includes a view of Advisor recommendations, but the recommendations are generated by Advisor. The exam may test that you use Advisor for recommendations and Cost Management for tracking and alerts.

How do I handle shared costs across multiple departments?

You can use cost allocation rules in Cost Management to split shared costs (e.g., a shared SQL database) among multiple cost centers. Cost allocation allows you to define percentages to distribute costs based on tags or resource groups. You can also use management groups to aggregate costs and then manually allocate. The exam may test that cost allocation is a feature of Cost Management and that it supports percentage-based splits.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Azure Cost Management and Budgets — now see how well it sticks with free AZ-104 practice questions. Full explanations included, no account needed.

Done with this chapter?