Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
If you read the Cost Analysis tutorial, then you're familiar with manually downloading your Cost Management data. However, you can create a recurring task that automatically exports your Cost Management data to Azure storage on a daily, or monthly basis. Exports is designed to streamline your FinOps practice by automating the export of other cost-impacting datasets. You can use the exported data with external systems and combine it with your own custom data.
In this tutorial, you learn how to:
The exports feature supports multiple datasets including price sheets, reservation recommendations, reservation details, and reservation transactions. Also, you can download cost and usage details using the open-source FinOps Open Cost and Usage Specification FOCUS format. It combines actual and amortized costs and reduces data processing times and storage and compute costs. FinOps datasets are often large and challenging to manage. Exports improve file manageability, reduce download latency, and help save on storage and network charges with the following functionality:
The exports feature has an updated user interface, which helps you to easily create multiple exports for various cost management datasets to Azure storage using a single, simplified create experience. Exports let you choose the latest or any of the earlier dataset schema versions when you create a new export. Supporting multiple versions ensures that the data processing layers that you built on for existing datasets are reused while you adopt the latest API functionality. You can selectively export historical data by rerunning an existing export job for a historical period. So, you don't have to create a new one-time export for a specific date range. You can enhance security and compliance by configuring exports to storage accounts behind a firewall. The Azure Storage firewall provides access control for the public endpoint of the storage account.
Data export is available for various Azure account types, including Enterprise Agreement (EA) and Microsoft Customer Agreement (MCA) customers. To view the full list of supported account types, see Understand Cost Management data. The following Azure permissions, or scopes, are supported per subscription for data export by user and group. For more information about scopes, see Understand and work with scopes.
For Azure Storage accounts:
Write permissions are required to change the configured storage account, independent of permissions on the export.
Your Azure storage account must be configured for blob or file storage.
Don't configure exports to a storage container that is configured as a destination in an object replication rule.
To export to storage accounts with firewall rules, you need other privileges on the storage account. These privileges are only required during export creation or modification:
Owner role on the storage account or
A custom role that includes:
Microsoft.Authorization/roleAssignments/write
Microsoft.Authorization/permissions/read
When you configure the firewall, ensure that Allow trusted Azure service access is enabled on the storage account. If you want to use the Exports REST API to write to a storage account behind a firewall, use API version 2023-08-01 or later. All newer API versions continue to support exports behind firewalls.
A system-assigned managed identity is created for a new export if the user has Microsoft.Authorization/roleAssignments/write
permissions on the storage account. This setup ensures that the export will continue to work if you enable a firewall in the future. After the export is created or updated, the user no longer needs the Owner role for routine operations.
The storage account configuration must have the Permitted scope for copy operations (preview) option set to From any storage account.
If you have a new subscription, you can't immediately use Cost Management features. It might take up to 48 hours before you can use all Cost Management features.
You can create multiple exports of various data types using the following steps.
Note
On the Exports page, at the top of the page, select + Create.
On the Basics tab, select a template that meets your scenario and then select Next.
Note: A template simplifies export creation by preselecting a set of commonly used datasets and their configurations.
Once you select a template, you see the Datasets tab where you can customize your export name by entering a common Export prefix, edit the preselected configuration, and add or remove exports from the list.
You can change the template and discard your export configurations by navigating back to the Basics tab and selecting a new template.
Review your export configuration and make any necessary changes. When done, select Review + create to complete the process.
Your new export appears in the list of exports. By default, new exports are enabled. If you want to disable or delete a scheduled export, select any item in the list, and then select either Disable or Delete.
The export process can take up to 24 hours to complete before the data is ready.
If you need to export to a storage account behind the firewall for security and compliance requirements, ensure that you have all prerequisites met.
Note
If you have an existing scheduled export and your change your storage network configuration, you must update the export and save it to reflect the changes.
Enable Allow trusted Azure services access on the storage account. You can turn that on while configuring the firewall of the storage account, from the Networking page. Here's a screenshot showing the page.
If you missed enabling that setting, it's automatically enabled when you create a new export and use an existing Storage account.
A system-assigned managed identity is created for a new job export when created or modified. You must have permissions because Cost Management uses the privilege to assign the StorageBlobDataContributor role to the managed identity. The permission is restricted to the storage account container scope. After the export job is created or updated, the user doesn't require Owner permissions for regular runtime operations.
Note
microsoft.Authorization/roleAssignments/delete
permissions. If the permissions aren't available, the user needs to manually remove the role assignment on the managed identity.Add exports to the list of trusted services. For more information, see Trusted access based on a managed identity.
You can view the list of available exports by navigating to the Exports page and manage individual exports by selecting them.
You can perform the following actions on individual exports.
Run now - Queues an unplanned export to run at the next available moment, regardless of the scheduled run time.
Export selected dates - Reruns an export for a historical date range instead of creating a new one-time export. You can extract up to 13 months of historical data in one-month chunks. This option isn't available for price sheets.
Disable - Temporarily suspends the export job.
Delete - Permanently removes the export.
Refresh - Updates the Run history.
When you create a scheduled export, the export runs at the same frequency for each export that runs later. For instance, if the export is scheduled to run once every UTC day, it creates a daily export of costs accumulated from the start of the month to the current date. Individual export runs can occur at different times throughout the day, so avoid relying on the exact time of the export runs. The run timing depends on the active load present in Azure during a given UTC day. Once an export run begins, your data should be available within 4 hours. Exports are scheduled using Coordinated Universal Time (UTC). The Exports API always uses and displays UTC.
When you create an export using the Exports API, specify the recurrencePeriod
in UTC time. The API doesn’t convert your local time to UTC.
recurrencePeriod
set to 2:00 PM. The API receives the input as 2:00 PM UTC, Friday, August 19.When you create an export in the Azure portal, its start date time is automatically converted to the equivalent UTC time.
Various datasets support different schedule frequency options as described in the following table.
Type of data | Frequency options |
---|---|
Price sheet | • One-time export • Current month • Daily export of the current month |
Reservation details | • One-time export • Daily export of month-to-date costs • Monthly export of last month's costs |
Reservation recommendations | • One-time export • Daily export |
Reservation transactions | • One-time export • Daily export • Monthly export of last month's data |
Cost and usage details (actual) Cost and usage details (amortized) Cost and usage details (FOCUS) Cost and usage details (usage only) |
• One-time export • Daily export of month-to-date costs • Monthly export of last month's costs • Monthly export of last billing month's costs |
You can use a management group to aggregate subscription cost information in a single container. Exports support management group scope for Enterprise Agreement but not for Microsoft Customer Agreement or other subscription types. Multiple currencies are also not supported in management group exports.
Exports at the management group scope support only usage charges. Purchases, including reservations and savings plans aren't supported. Amortized cost reports are also not supported. When you create an export from the Azure portal for a management group scope, the metric field isn't shown because it defaults to the usage type. When you create a management group scope export using the REST API, choose ExportType as Usage
.
The file partitioning is a feature that is activated by default to facilitate the management of large files. This functionality divides larger files into smaller segments, which enhances the ease of file transfer, download, ingestion, and overall readability. It's advantageous for customers whose cost files increase in size over time. The specifics of the file partitions are described in a manifest.json file provided with each export run, enabling you to rejoin the original file.
With every export, run you get multiple partitions of the data along with a manifest.json file. The manifest contains a summary of the full dataset and information for each file partition in it. Each file partition has headers and contains only a subset of the full dataset. To handle the full dataset, you must ingest each partition of the export.
Here's a _manifest.json example manifest file.
{
"manifestVersion": "2024-04-01",
"byteCount": 8032,
"blobCount": 1,
"dataRowCount": 36,
"exportConfig": {
"exportName": "sample",
"resourceId": "/providers/Microsoft.Billing/billingAccounts/1234567/providers/Microsoft.CostManagement/exports/sample",
"dataVersion": "2023-05-01",
"apiVersion": "2023-07-01-preview",
"type": "ReservationRecommendations",
"timeFrame": "MonthToDate",
"granularity": null
},
"deliveryConfig": {
"partitionData": true,
"dataOverwriteBehavior": "OverwritePreviousReport",
"fileFormat": "Csv",
"compressionMode": "None",
"containerUri": "/subscriptions/ 00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Storage/storageAccounts/samplestorage",
"rootFolderPath": "folder"
},
"runInfo": {
"executionType": "OnDemand",
"submittedTime": "2025-03-21T21:04:06.5234447Z",
"runId": "bbac73f1-9a05-4de6-84ab-c72b568a03b4",
"startDate": "2025-03-01T00:00:00",
"endDate": "2025-03-21T00:00:00Z"
},
"blobs": [
{
"blobName": " folder/sample/ 00000000-0000-0000-0000-000000000000/part0.csv",
"byteCount": 8032,
"dataRowCount": 36
}
]
}
You can easily verify that your Cost Management data is being collected and view the exported CSV file using Azure Storage Explorer.
In the export list, select the storage account name. On the storage account page, select Open in Explorer. If you see a confirmation box, select Yes to open the file in Azure Storage Explorer.
In Storage Explorer, navigate to the container that you want to open and select the folder corresponding to the current month. A list of CSV files is shown. Select one and then select Open.
The file opens with the program or application set to open CSV file extensions. Here's an example in Excel.
To download the exported CSV or Parquet file, browse to the file in Microsoft Azure Storage Explorer and download it.
You can view the run history of your scheduled export by selecting an individual export in the exports list page. The exports list page also provides you with quick access to view the run time of your previous exports and the next time and export will run. Here's an example showing the run history.
Select an export to view the run history.
There are two runs per day for the first five days of each month after you create a daily export of cost and usage details dataset. One run executes and creates a file with the current month’s cost data. It's the run that's available for you to see in the run history. A second run also executes to create a file with all the costs from the prior month. The second run isn't currently visible in the run history. Azure executes the second run to ensure that your latest file for the past month contains all charges exactly as seen on your invoice. It runs because there are cases where latent usage and charges are included in the invoice up to 72 hours after the calendar month is closed. To learn more about Cost Management usage data updates, see Cost and usage data updates and retention.
Note
Daily export created between 1st to 5th of the current month wouldn't generate data for the previous month as the export schedule starts from the date of creation.
For a comprehensive reference of all available datasets, including the schema for current and historical versions, see Cost Management dataset schema index.
Agreement types, scopes, and required roles are explained at Understand and work with scopes.
Data types | Supported agreement | Supported scopes |
---|---|---|
Cost and usage (actual) | • EA • MCA that you bought through the Azure website • MCA enterprise • MCA that you buy through a Microsoft partner • Azure internal |
• EA - Enrollment, department, account, subscription, and resource group • MCA - Billing account, billing profile, Invoice section, subscription, and resource group • Microsoft Partner Agreement (MPA) - Customer, subscription, and resource group |
Cost and usage (amortized) | • EA • MCA that you bought through the Azure website • MCA enterprise • MCA that you buy through a Microsoft partner • Azure internal |
• EA - Enrollment, department, account, subscription, and resource group • MCA - Billing account, billing profile, Invoice section, subscription, and resource group • MPA - Customer, subscription, and resource group |
Cost and usage (FOCUS) | • EA • MCA that you bought through the Azure website • MCA enterprise • MCA that you buy through a Microsoft partner |
• EA - Enrollment, department, account, subscription, and resource group. NOTE: The management group scope isn't supported for Cost and usage details (FOCUS) exports. • MCA - Billing account, billing profile, invoice section, subscription, and resource group • MPA - Customer, subscription, resource group. |
All available prices | • EA • MCA that you bought through the Azure website • MCA enterprise • MCA that you buy through a Microsoft partner |
• EA - Billing account • All other supported agreements - Billing profile |
Reservation recommendations | • EA • MCA that you bought through the Azure website • MCA enterprise • MCA that you buy through a Microsoft partner |
• EA - Billing account • All other supported agreements - Billing profile |
Reservation transactions | • EA • MCA that you bought through the Azure website • MCA enterprise • MCA that you buy through a Microsoft partner |
• EA - Billing account • All other supported agreements - Billing profile |
Reservation details | • EA • MCA that you bought through the Azure website • MCA enterprise • MCA that you buy through a Microsoft partner |
• EA - Billing account • All other supported agreements - Billing profile |
The exports experience currently has the following limitations.
The new exports experience doesn't fully support the management group scope and has feature limitations. Only the cost and usage details (Usage) dataset is available in CSV format without any compression.
Azure MOSP billing scopes and subscriptions don’t support FOCUS datasets.
Shared access service (SAS) key-based cross tenant export is only supported for Microsoft partners at the billing account scope. It isn't supported for other partner scenarios like any other scope, EA indirect contract, or Azure Lighthouse.
EA price sheet: Reservation prices are only available for the current month price sheet and can't be retrieved for historical exports. To retain historical reservation prices, set up recurring exports.
Here are some frequently asked questions and answers about exports.
The file partitioning is a feature that is activated by default to facilitate the management of large files. This functionality divides larger files into smaller segments, which enhances the ease of file transfer, download, ingestion, and overall readability. It's advantageous for customers whose cost files increase in size over time. The specifics of the file partitions are described in a manifest.json file provided with each export run, enabling you to rejoin the original file.
In the new export experience, missing attributes such as subscription IDs are set to null or empty rather than using a default empty GUID (00000000-0000-0000-0000-000000000000). The null or empty values more accurately indicate the absence of a value. It affects charges pertaining to unused reservations, unused savings plan, and rounding adjustments.
You can retrieve up to 13 months of historical data through the Azure portal for all datasets, except for reservation recommendations, which are limited to the current recommendation snapshot. To access data older than 13 months, you can use the REST API.
Cost and usage (Actual), Cost and usage (Amortized), and Cost and usage (FOCUS): Up to seven years of data.
Reservation transactions: Up to seven years of data across all channels.
Reservation recommendations, Reservation details: Up to 13 months of data.
All available prices:
MCA/MPA: Up to 13 months.
EA: Up to 25 months (starting from December 2022).
The following table captures the supported formats and compression formats for each of the exported datasets. If you're creating an export with multiple datasets, Parquet & compression options only appear in the dropdown if all of the selected datasets support them.
Dataset | Format supported | Compression supported |
---|---|---|
Cost and usage details (Actual) | CSV | None, Gzip |
Parquet | None, Snappy | |
Cost and usage details (Amortized) | CSV | None, Gzip |
Parquet | None, Snappy | |
Cost and usage details (Usage only) | CSV | None, Gzip |
Parquet | None, Snappy | |
Cost and usage details (FOCUS) | CSV | None, Gzip |
Parquet | None, Snappy | |
Reservation details | CSV | None |
Reservation recommendations | CSV | None |
Reservation transactions | CSV | None |
Price Sheet | CSV | None, Gzip |
Parquet | None, Snappy |
When attempting to create an Export to a storage account with a firewall, the user must have the Owner role or a custom role with Microsoft.Authorization/roleAssignments/write
and Microsoft.Authorization/permissions/read
permissions. If these permissions are missing, you encounter an error similar to:
{
"error":{
"code":"Unauthorized",
"message":"The user does not have authorization to perform 'Microsoft.Authorization/roleAssignments/write' action on specified storage account, please use a storage account with sufficient permissions. If the permissions have changed recently then retry after some time."
}
}
You can check for the permissions on the storage account by referring to the steps in Check access for a user to a single Azure resource.
The maximum limit is 3,000 subscriptions per management group in Cost Management, including exports.
To manage more than 3,000 subscriptions:
Organize them into smaller management groups. For example, if you have a total of 12,500 subscriptions, create five management groups with approximately 2,500 subscriptions each. Create separate exports for each management group scope and combine the exported data for a complete view.
Alternatively, if all subscriptions are under the same billing account, create an export at the billing account scope to get combined data.
The exported files are organized in a structured hierarchy within the storage folders. The naming and hierarchy of the folders are as follows:
StorageContainer/StorageDirectory/ExportName/[YYYYMMDD-YYYYMMDD]/[RunID]/
This path contains the CSV files and a manifest file.
For example:
StorageContainer/StorageDirectory/ExportName/[20240401-20240430]/[RunID1]/
This folder contains the CSV files and the manifest file for all export runs during the April 2024 time period.
StorageContainer/StorageDirectory/ExportName/[20241101-20241130]/[RunID2]/
This folder contains the CSV files and the manifest file for all export runs during the November 2024 time period.
Azure ensures that the cost file for a particular month is available within that month's folder. For example, [20240401-20240430]
, [20241101-20241130]
and so on.
Without file overwrite: You see multiple RunIDs within the month folder, representing different export runs. For example, 30 different RunIDs for 30 days.
With file overwrite: You see only one RunID within the month folder, representing the latest run.
At the time of export creation, you can name the StorageContainer, StorageDirectory, and ExportName.
If you see garbled characters in Excel and you use an Asian-based language, such as Japanese or Chinese, you can resolve this issue with the following steps:
For new versions of Excel:
For older versions of MS Excel:
You might notice discrepancies between the aggregated cost from an exported file and the cost displayed in Cost Analysis. These differences can occur if the tool you use to read and aggregate the total cost truncates decimal values. This issue is common in tools like Power BI and Microsoft Excel.
Check if decimal places are being dropped when cost values are converted into integers. Losing decimal values can result in a loss of precision and misrepresentation of the aggregated cost.
To manually transform a column to a decimal number in Power BI, follow these steps:
When you open a .csv or .txt file, Excel might display a warning message if it detects that an automatic data conversion is about to occur. Select the Convert option when prompted to ensure numbers are stored as numbers and not as text. It ensures the correct aggregated total. For more information, see Control data conversions in Excel for Windows and Mac.
If the correct conversion isn't used, you get a green triangle with a Number Stored as Text
error. This error might result in incorrect aggregation of charges, leading to discrepancies with cost analysis.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayTraining
Learning path
Run high-performance computing (HPC) applications on Azure - Training
Azure HPC is a purpose-built cloud capability for HPC & AI workload, using leading-edge processors and HPC-class InfiniBand interconnect, to deliver the best application performance, scalability, and value. Azure HPC enables users to unlock innovation, productivity, and business agility, through a highly available range of HPC & AI technologies that can be dynamically allocated as your business and technical needs change. This learning path is a series of modules that help you get started on Azure HPC - you
Certification
Microsoft Certified: Information Protection and Compliance Administrator Associate - Certifications
Demonstrate the fundamentals of data security, lifecycle management, information security, and compliance to protect a Microsoft 365 deployment.