Configure scopes Connect FinOps hubs to your billing accounts and subscriptions by configuring Cost Management exports manually or granting FinOps hubs access to manage exports for you.
Grant access Configure exports
On this page
FinOps hubs uses Cost Management exports to import cost data for the billing accounts and subscriptions you want to monitor. You can either configure Cost Management exports manually or grant FinOps hubs access to manage exports for you.
Microsoft Cost Management does not support managed exports for Microsoft Customer Agreement billing accounts. Please configure Cost Management exports manually.
For the most seamless experience, we recommend allowing FinOps hubs to manage exports for you when possible. This option requires the least effort to maintain over time.
🛠️ Configure exports manually
If you cannot grant permissions for your scope, you can create Cost Management exports manually to accomplish the same goal.
-
Create a new FOCUS cost export using the following settings:
- Type of data =
Cost and usage details (FOCUS)
1 - Dataset version =
1.0
2 - Frequency =
Daily export of month-to-date costs
3 - File partitioning = On
- Overwrite data = Off4
- Storage account = (Use subscription/resource deployed with your hub)
- Container =
msexports
- Directory = (Specify a unique path for this scope5)
- EA billing account:
billingAccounts/{enrollment-number}
- MCA billing profile:
billingProfiles/{billing-profile-id}
- Subscription:
subscriptions/{subscription-id}
- Resource group:
subscriptions/{subscription-id}/resourceGroups/{rg-name}
- EA billing account:
- Type of data =
- Create another export with the same settings except set Frequency to
Monthly export of last month's costs
. - Run your exports to initialize the dataset.
- Exports can take up to a day to show up after first created.
- Use the Run now command at the top of the Cost Management Exports page.
- Your data should be available within 15 minutes or so, depending on how big your account is.
- If you want to backfill data, open the export details and select the Export selected dates command to export one month at a time or use the Start-FinOpsCostExport PowerShell command to export a larger date range.
- Repeat steps 1-3 for each scope you want to monitor.
1) FinOps hubs 0.2 and beyond requires FOCUS cost data. As of July 2024, the option to export FOCUS cost data is only accessible from the central Cost Management experience in the Azure portal. If you do not see this option, please search for or navigate to Cost Management Exports. 2) FinOps hubs 0.4 supports both FOCUS 1.0 and FOCUS 1.0 preview. Power BI reports in 0.4 are aligned to FOCUS 1.0 regardless of whether data was ingested as FOCUS 1.0 preview. If you need 1.0 preview data and reports, please use FinOps hubs 0.3. 3) Configuring a daily export starts in the current month. If you want to backfill historical data, create a one-time export and set the start/end dates to the desired date range. 4) While most settings are required, overwriting is optional. We recommend not overwriting files so you can monitor your ingestion pipeline using the Data ingestion report. If you do not plan to use that report, please enable overwriting. 5) Export paths can be any value but must be unique per scope. We recommended using a path that identifies the source scope (e.g., subscription or billing account). If 2 scopes share the same path, there could be ingestion errors.
🔐 Configure managed exports
Managed exports allow FinOps hubs to setup and maintain Cost Management exports for you. To enable managed exports, you must grant Azure Data Factory access to read data across each scope you want to monitor.
Managed exports are only available in FinOps hubs 0.4 and beyond.
Managed exports use a managed identity (MI) to configure the exports automatically. Follow these steps to set it up:
-
Grant access to Azure Data Factory.
- From the FinOps hub resource group, navigate to Deployments > hub > Outputs, and make note of the values for managedIdentityId and managedIdentityTenantId. You’ll use these in the next step.
- Use the following guides to assign access to each scope you want to monitor:
- EA enrollments – Assign enrollment reader role permission.
- EA departments – Assign department reader role permission.
- Subscriptions and resource groups – Assign Azure roles using the Azure portal.
-
Add the desired scopes.
- From the FinOps hub resource group, open the storage account and navigate to Storage browser > Blob containers > config.
- Select the settings.json file, then select ⋯ > View/edit to open the file.
- Update the scopes property to include the scopes you want to monitor. See Settings.json scope examples for details.
- Select the Save command to save your changes. FinOps hubs should process the change within a few minutes and data should be available within 30 minutes or so, depending on the size of your account.
Do not add duplicate or overlapping scopes as this will lead to duplication of data.
-
Backfill historical data.
As soon as you configure a new scope, FinOps hubs will start to monitor current and future costs. To backfill historical data, you must run the config_RunBackfill pipeline.
To run the pipeline from the Azure portal:
- From the FinOps hub resource group, open the Data Factory instance, select Launch Studio, and navigate to Author > Pipelines > config_RunBackfill.
- Select Debug in the command bar to run the pipeline. The total run time will vary depending on the retention period and number of scopes you’re monitoring.
To run the pipeline from PowerShell:
Get-AzDataFactoryV2 ` -ResourceGroupName "{hub-resource-group}" ` -ErrorAction SilentlyContinue ` | ForEach-Object { Invoke-AzDataFactoryV2Pipeline ` -ResourceGroupName $_.ResourceGroupName ` -DataFactoryName $_.DataFactoryName ` -PipelineName 'config_RunBackfill' }
Settings.json scope examples
-
EA billing account
"scopes": [ { "scope": "/providers/Microsoft.Billing/billingAccounts/1234567" } ]
-
EA department
"scopes": [ { "scope": "/providers/Microsoft.Billing/billingAccounts/1234567/departments/56789" } ]
-
Subscription
"scopes": [ { "scope": "/subscriptions/00000000-0000-0000-0000-000000000000" } ]
-
Multiple subscriptions
"scopes": [ { "scope": "/subscriptions/00000000-0000-0000-0000-000000000000" }, { "scope": "subscriptions/00000000-0000-0000-0000-000000000001" } ]
-
Resource group
"scopes": [ { "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ftk-finops-hub" } ]
🖥️ Configure exports via PowerShell
If this is the first time you are using the FinOps toolkit PowerShell module, refer to the PowerShell deployment guide to install the module.
-
Install the FinOps toolkit PowerShell module.
Import-Module -Name FinOpsToolkit
-
Create the export and run it now to backfill up to 12 months of data.
New-FinopsCostExport -Name 'ftk-FinOpsHub-costs' ` -Scope "{scope-id}" ` -StorageAccountId "{storage-resource-id}" ` -Backfill 12 ` -Execute
⏭️ Next steps
Connect to Power BI Learn more