How to reduce Microsoft Fabric costs with intelligent capacity suspension?
Table of Contents
If you’re using Pay-As-You-Go pricing model for development or you don’t need heavy overnight processing, you can pause Fabric capacity to stop billing. You can do it manually in the Azure portal or automate it with the services below:
- Azure Automation Runbooks – Using PowerShell or Python scripts on a schedule you can automatically start or stop your capacity. The first 500 minutes of runtime per month are free, after that it’s $0.002/min. Starting/stopping a capacity takes under 1 minute. Running the script twice a day uses up approximately 60 minutes per month, so it fits within the free monthly minutes allowance.
- Azure Logic Apps – Is a visual tool designed for creating automations, workflows, and orchestration. The pricing is as follows: $0.000125 per Logic App trigger and $0.000025 per action (an action is any step in the workflow). On the Consumption plan the first 4,000 actions/month are free. With ~300 actions per month and 60 runs, your cost comes out to about $0.0075.
- Power Automate – Is similar to Logic Apps but focused more on Microsoft 365 scenarios. It’s the priciest option here at roughly $0.60 per run. At 60 runs per month, that’s about $36.00, or you can use a per-user license at $15.00/month.
- Azure Data Factory – You can also automate start/stop of Fabric capacity using Pipelines. A Web activity can call the Fabric REST API to check the current state and then trigger resume or suspend as needed. The estimated monthly cost should not exceed $1.00.
In the following article, I will focus on a free and very easy-to-configure approach using Azure Automation Runbooks. We can have two kinds of scheduled scripts:
- Fixed one – runs at specific hours,
- Dynamic – runs based on Fabric activity. If no Interactive or Background operations are detected, the capacity can be suspended.
Fixed – Automation for specific hours
The mechanism automatically starts and stops Microsoft Fabric Capacity based on a defined schedule. It operates using a Managed Identity that has the necessary permissions to manage the capacity.
Permissions and requirements:
Go to configuration steps below first.
- Enable System-assigned Managed Identity:
- Go to Automation Accounts ➜ Account Settings ➜ Identity
- System-assigned tab:
- Status: ON
- Save

- Add Automation Account permission to resume or suspend Fabric Capacity. Add Contributor role for Managed Identity (name of your Automation Account) or Security Group (in which you add your Managed Identity):
- Azure Portal ➜ search for Fabric Capacity ➜ select desired Fabric Capacity
- From menu on the left-hand side select Access control (IAM)
- Click Add ➜ Add role assignment:
- Privileged administrator roles tab
- Select the role Contributor
- In the Members tab select User, group or service principal ➜ Select members ➜ search for name of your Automation Account (MI) or Security Group
- Select
- Click Review + assign

Configuration steps:
- Azure Portal ➜ search for Automation Accounts
- Create Automation Account:
- Select Resource group
- Give Automation account a name
- Select Region
- Advanced: select System assigned
- Review + Create
- Configure permissions and requirements from above.
- Inside the Automation Account go to Process Automation ➜ Runbooks
- Create Runbook
- Provide a name
- Runbook type: PowerShell
- Runtime version: 7.2
- Review + Create
- You will see your newly created Runbook on the list ➜ click on it ➜ Edit (in portal)

- Copy and paste the code from Here ➜ Save ➜ Publish
- You can test the code by clicking Start:
- In parameters (save them for later) provide:
- SubscriptionId ➜ Azure subscription ID
- ResourceGroupName ➜ Resource group with the Fabric capacity
- CapacityName ➜ Fabric Capacity Name
- Operation ➜ Operation to stop or start Capacity, either one of words: suspend, stop, pause, 0, resume, start, run, 1
- When the Job is running, you can verify what is the current operation and status in the Output tab.
- In parameters (save them for later) provide:
- If Capacity is correctly resuming and suspending you can create a schedule. Go to Automation Account ➜ in the menu on the left expand Shared Resources ➜ Schedules ➜ Add a schedule:
- Provide a name: Suspend Fabric at 5 pm
- Select time and recurring schedule
- Pick correct Time zone
- Recurring: every 1 Day
- Create

- Go back to your Runbook ➜ Resources ➜ Schedules ➜ Add a schedule:
- Select Schedule to link a schedule “Suspend Fabric at 5 pm”
- Select Parameters and run settingswhere you need to provide parameters (only once for scheduling purposes). Remember to place stop in the Operation parameter.
- OK
- You should be able to see the schedule linked to Runbook.
- If you want to start capacity on specific hour you will need to create another schedule and type in the Operation parameter start.
Dynamic – Automation based on activity
The mechanism monitors activity on the Microsoft Fabric capacity and automatically suspends it when there is no user or process activity (Interactive and Background operations) detected.
This makes it possible to dynamically shut down capacity during periods of inactivity, which further reduces Fabric costs.
It is important to remember:
- The script only suspends the capacity. You’ll need to start it again manually or via the schedule described in the Fixed – Automation for specific hours section.
- Activity data in Fabric Capacity Metrics App is delayed by about 15 minutes, so schedule the mechanism to run in time run at regular intervals, for example every hour.
- Make sure to refresh the semantic model for Fabric Capacity Metrics App every day.
- The UTC time offset should match the one entered during the configuration of the Microsoft Fabric Capacity Metrics App.
- Refreshing and interacting with Fabric Capacity Metrics App consumes capacity.
Permissions and requirements:
- Same as for the Fixed – Automation for specific hours + all listed below.
- Fabric Capacity Metrics App installed – here you can find the instructions.
- Fabric Admin Portal ➜ Tenant Settings ➜ Service principals can call Fabric public APIs = Enabled (Recommended: restrict to a Security Group that contains the Managed Identity account)

- It is recommended to keep your default CapacityID in the configuration of the Fabric Capacity Metrics App to match the CapacityID in the parameters of your script.
Configuration steps:
- Go through the steps from 1 to 6 from Fixed – Automation for specific hours
- Copy and paste the code from Here ➜ Save ➜ Publish
- You can test the code by clicking Start:
- In parameters (save them for later) provide:
- SubscriptionId ➜ Azure subscription ID
- ResourceGroupName ➜ Resource group with the Fabric capacity
- CapacityName ➜ Fabric Capacity name
- CapacityId ➜ Fabric Capacity ID
- WorkspaceId ➜ Workspace ID (where the Fabric Capacity Metrics semantic model lives)
- DatasetId ➜ Semantic Model ID (dataset)
- UserTimezoneShiftHours = 2 ➜ UTC shift in hours (e.g., 2 for UTC+2)
- DataTimestampShiftHours = -5 ➜ Align data timestamps with your timezone
- IdleThresholdHours = 1 ➜ Lookback window in hours to check for activity
- MinimumCUThresholdSeconds = 100 ➜ Noise threshold: minimum sum of CU seconds to consider capacity “active”
- When the Job is running, you can verify what is the current operation and status in the Output tab.
- In parameters (save them for later) provide:

- If Capacity is correctly suspending you can create a schedule. Go to Automation Account ➜ in the menu on the left expand Shared Resources ➜ Schedules ➜ Add a schedule:
- Provide a name: Every Hour Offset Minus 5min
- Select time (5 min before full hour) and recurring schedule
- Pick correct Time zone
- Recurring: every 1 Hour
- Create
- Go back to your Runbook ➜ Resources ➜ Schedules ➜ Add a schedule:
- Select Scheduleto link a schedule “Every Hour Offset Minus 5min”
- Select Parameter s and run settings where you need to provide parameters (only once for scheduling purposes).
- You should be able to see the schedule linked to Runbook.
What can be improved
- Combination of both approaches – for example, turn the capacity off dynamically after 5:00 pm if there’s no activity.
- Minimum uptime window – don’t suspend if capacity started < X minutes ago.
- Alerting – send the message to Teams or Email with information about Capacity suspension.

