Use Azure Data Factory Pipelines to Turn Your Fabric Capacities Off | Save Money in Microsoft Fabric
Microsoft Fabric capacities can become a significant expense if they are left running when not actively in use. In this training session from Pragmatic Works, data engineer trainer Zane Goodman walks through a practical and cost‑effective approach to automatically turning Fabric capacities off using Azure Data Factory (ADF) pipelines.
By combining Azure APIs, Azure Data Factory activities, and Teams notifications, organizations can ensure their Fabric environments are optimized for both performance and cost control.
Why Managing Fabric Capacity Costs Matters
Zane begins by highlighting the cost implications of Microsoft Fabric capacities. Higher-tier capacities, such as an F‑128, can cost nearly $17,000 per month, while even smaller capacities like an F‑16 can reach approximately $2,000 monthly. Without automation, it is easy for unused capacities to remain active overnight or during non-business hours.
The goal of this solution is simple: automatically pause Fabric capacities when they are not needed, helping teams avoid unnecessary spending.
Why Use Azure Data Factory Instead of Fabric Pipelines
Although Fabric pipelines may appear to be a logical choice, Zane explains why Azure Data Factory is better suited for this scenario. If a pipeline designed to shut down a Fabric capacity is running on the same capacity, it can create dependency and reliability issues.
Azure Data Factory avoids this problem because:
- It operates independently of Fabric capacities
- It is inexpensive, charging only for pipeline executions
- It can safely control Fabric resources without relying on them
Storing Capacity Information for Automation
The automation begins with a simple but critical requirement: access to Fabric capacity metadata. Zane stores this information in a CSV file located in Azure Data Lake Storage Gen2. The file contains three essential fields:
- Fabric capacity name
- Resource group
- Subscription ID
An ADF Lookup activity reads this file and outputs an array of capacity records. This approach provides flexibility, allowing teams to control exactly which capacities are included in the automation process.
Looping Through Capacities with a ForEach Activity
Once the capacity data is retrieved, the pipeline uses a ForEach activity to process each capacity individually. This ensures every capacity is evaluated and handled correctly.
Inside the loop, a Web activity calls the Azure Management API to determine whether the capacity is currently active or paused. This step is critical to prevent errors that would occur if the pipeline attempted to pause an already inactive capacity.
Using Conditional Logic to Handle Capacity States
The pipeline uses an If Condition activity to evaluate the state returned by the API:
- If the capacity is already paused, the pipeline records the status and sends a notification
- If the capacity is active, the pipeline proceeds to suspend it using the Azure API
This conditional logic ensures clean execution while maintaining visibility into the status of all capacities.
Confirming Capacity Shutdown and Sending Notifications
Rather than assuming the suspend operation succeeded, Zane demonstrates a best practice by confirming the capacity state with a second API call. This validation step guarantees the capacity is truly paused.
After confirmation, the pipeline prepares a Teams adaptive card containing key details such as:
- Capacity name
- Pipeline run ID
- Confirmed capacity state
- Timestamp of the action
The adaptive card is then sent to a Teams channel using a webhook, providing immediate visibility and peace of mind that capacities are no longer running.
Scheduling Automation with Triggers
To fully automate the process, the pipeline uses an Azure Data Factory trigger. In this example, capacities are automatically turned off daily at 6:00 PM. This schedule can be adjusted to align with business hours, overnight workloads, or maintenance windows.
Multiple triggers can also be created to support different operational requirements.
Configuring Permissions with Managed Identity
For the pipeline to control Fabric capacities, proper permissions are required. Zane explains how to use ADF’s system-assigned managed identity and grant it a custom role at the resource group or capacity level.
The required permissions include:
- Read Fabric capacity
- Suspend Fabric capacity
- Resume Fabric capacity (optional for future expansion)
Once assigned, the pipeline can securely manage Fabric capacities without storing credentials.
Final Thoughts
This Azure Data Factory solution provides a reliable, scalable way to control Microsoft Fabric capacity costs. By combining automation, validation, and notifications, organizations gain confidence that resources are only running when needed.
Zane emphasizes that this pattern is frequently implemented during consulting engagements and Fabric migrations, helping clients avoid costly oversights. With minimal effort, teams can extend this approach to also resume capacities, customize alerts, or integrate additional governance controls.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Fabric and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
Zane Goodman is a Trainer for Pragmatic Works specializing in Fabric, Azure and more. He's worked in skilled labor roles as well as the construction industry. Zane spent a lot of time in attics, on boom lifts, and in ditches making sure all the lights turned on properly. Now his primary focus is turning on the light for learning, helping our customers learn the ins and outs of Power Apps.
Free Community Plan
On-demand learning
Most Recent
private training

Leave a comment