This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
05-11-2026 17:48 PM - last edited 05-12-2026 16:40 PM
There's a moment every data engineer knows well: you've got a dozen Fabric workspaces to manage, pipelines to trigger, files to move into OneLake, and deployments to ship — all before standup. Clicking through the Fabric portal is fine for exploration, but when speed, repeatability, and automation matter, you need something sharper.
Meet Fabric CLI (fab) — Microsoft's official open-source command-line interface for Microsoft Fabric. It brings your entire data platform to the terminal, letting you navigate workspaces, run pipelines, manage items, upload data, and wire everything into CI/CD pipelines — all without touching a browser.
This post covers everything you need to get up and running: what Fabric CLI is, why it matters, how to install it, and real command examples you can use today.
Fabric CLI (fab) is a cross-platform, open-source command-line tool built by Microsoft that gives you direct access to Microsoft Fabric from your terminal. Think of it as a shell that speaks fluent Fabric — it exposes workspaces, lakehouses, pipelines, semantic models, notebooks, and more as a navigable, scriptable file system.
Released as Generally Available (v1.5+), it is fully supported for production use and backed by Microsoft's SLA. It works on:
At its core, fab does two things brilliantly: it mirrors familiar shell UX (think ls, cd, cp, rm) applied to Fabric resources, and it exposes automation-ready commands for running and deploying Fabric items at scale.
Portal navigation is built for discovery. CLI is built for execution. Once you know what you want to do, fab gets you there in a single command.
Every fab command works identically in your local terminal and in a CI/CD YAML pipeline. There's no "portal-only" escape hatch — everything is scriptable.
Fabric CLI bridges the gap between data engineering and modern DevOps practices. You can trigger pipelines, promote deployments, and manage Git-backed workspaces directly inside your GitHub Actions or Azure DevOps workflows.
The CLI is open-source on GitHub (microsoft/fabric-cli), meaning the community can contribute, audit, and extend it.
Fabric CLI supports a wide range of Fabric item types: Lakehouses, Notebooks, Data Pipelines, Semantic Models, Warehouses, Dataflows, GraphQL APIs, CosmosDB Databases, SQL Databases, Variable Libraries, Copy Jobs, Power BI Reports, and more.
Fabric CLI is distributed via PyPI and requires Python 3.8+.
pip install ms-fabric-cli
Verify your installation:
fab --version
You should see output like:
fab version 1.5.x
Tip: If you're using a virtual environment, activate it before installing to keep dependencies clean.
fab auth login
This opens a browser window for Microsoft Entra ID (Azure AD) sign-in — perfect for day-to-day local use.
fab auth login \ -u $CLIENT_ID \ -p $CLIENT_SECRET \ --tenant $TENANT_ID
Use this in GitHub Actions or Azure DevOps secrets for unattended runs.
When running on an Azure-hosted machine with a managed identity, authentication is handled automatically — no credentials to manage.
Fabric CLI models your Fabric tenant as a navigable file system. If you've used a Unix shell, this will feel immediately natural.
fab ls
Output:
Sales Analytics.Workspace Marketing Data.Workspace Finance Reporting.Workspace DevOps Sandbox.Workspace
fab ls "Sales Analytics.Workspace"
Output:
SalesLakehouse.Lakehouse DailyIngest.DataPipeline SalesModel.SemanticModel SalesReport.Report
fab ls -l "Sales Analytics.Workspace"
Type Name Modified ----------------- ----------------------- ------------------- Lakehouse SalesLakehouse 2026-04-28 09:12 DataPipeline DailyIngest 2026-05-01 14:45 SemanticModel SalesModel 2026-05-02 08:30 Report SalesReport 2026-05-02 08:35
fab cd "Sales Analytics.Workspace" fab ls
Once you cd into a workspace, all relative paths are scoped to it.
One of the most powerful everyday uses of Fabric CLI is triggering and monitoring Data Pipelines.
fab run "Sales Analytics.Workspace/DailyIngest.DataPipeline"
Output:
Pipeline run started: run_id=abc123 Status: Running... Status: Succeeded ✓ (elapsed: 4m 32s)
fab run "Sales Analytics.Workspace/DailyIngest.DataPipeline" \
-i '{"param_date": "2026-05-10", "env": "production"}'fab job run-sch DailyIngest.datapipeline \ --type daily \ --interval "06:00"
Fabric CLI makes it trivial to move data between your local machine and OneLake storage inside a Lakehouse.
fab cp ./data/sales_may.csv \ "Sales Analytics.Workspace/SalesLakehouse.Lakehouse/Files/sales_may.csv"
fab cp \ "Sales Analytics.Workspace/SalesLakehouse.Lakehouse/Files/sales_may.csv" \ ./local/downloads/
fab cp ./reports/ \ "Sales Analytics.Workspace/SalesLakehouse.Lakehouse/Files/reports/" \ --recursive
fab ls "Sales Analytics.Workspace/SalesLakehouse.Lakehouse/Files/"
fab mkdir "New Project.Workspace"
fab rm "Sales Analytics.Workspace/OldPipeline.DataPipeline"
fab cp \ "Sales Analytics.Workspace/SalesReport.Report" \ "Finance Reporting.Workspace/SalesReport.Report"
Introduced in v1.5, the deploy command enables one-command deployments across environments — perfect for promoting from dev to staging to production.
fab deploy \ --source "DevOps Sandbox.Workspace" \ --target "Finance Reporting.Workspace"
You can define your deployment rules in a deploy.yml:
# deploy.yml source: DevOps Sandbox.Workspace target: Finance Reporting.Workspace items: - DailyIngest.DataPipeline - SalesModel.SemanticModel - SalesReport.Report
Then run:
fab deploy --config deploy.yml
This is especially powerful inside CI/CD pipelines — the same command works locally and in automation.
Fabric CLI v1.5 extended first-class support for Power BI operations.
fab rebind \ "Finance Reporting.Workspace/SalesReport.Report" \ --model "Finance Reporting.Workspace/FinanceModel.SemanticModel"
fab refresh \ "Sales Analytics.Workspace/SalesModel.SemanticModel"
fab set \ "Sales Analytics.Workspace/SalesReport.Report" \ --property "description" \ --value "Updated May 2026 sales metrics"
Where Fabric CLI truly shines is in automated pipelines. Here's a complete GitHub Actions workflow that authenticates, runs a pipeline, and deploys on merge to main.
# .github/workflows/fabric-deploy.yml
name: Fabric Deploy
on:
push:
branches:
- main
jobs:
deploy-fabric:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Fabric CLI
run: pip install ms-fabric-cli
- name: Authenticate with Service Principal
run: |
fab auth login \
-u ${{ secrets.FABRIC_CLIENT_ID }} \
-p ${{ secrets.FABRIC_CLIENT_SECRET }} \
--tenant ${{ secrets.FABRIC_TENANT_ID }}
- name: Run data ingest pipeline
run: |
fab run "Sales Analytics.Workspace/DailyIngest.DataPipeline"
- name: Deploy to Production workspace
run: |
fab deploy --config deploy.ymlAnd the equivalent in Azure DevOps Pipelines:
# azure-pipelines.yml
trigger:
branches:
include:
- main
pool:
vmImage: ubuntu-latest
steps:
- script: pip install ms-fabric-cli
displayName: Install Fabric CLI
- script: |
fab auth login \
-u $(FABRIC_CLIENT_ID) \
-p $(FABRIC_CLIENT_SECRET) \
--tenant $(FABRIC_TENANT_ID)
displayName: Authenticate
- script: |
fab run "Sales Analytics.Workspace/DailyIngest.DataPipeline"
displayName: Run Pipeline
- script: |
fab deploy --config deploy.yml
displayName: Deploy to ProductionWhen something goes wrong, verbose output is your best friend:
fab config set debug_enabled true
Now all CLI commands will output detailed request/response information.
If you're always working against the same capacity, set it once:
fab config set default_capacity "My Production Capacity"
Preview what a command will do before executing it:
fab run "Sales Analytics.Workspace/DailyIngest.DataPipeline" --dry-run
This is invaluable for validating automation scripts before they touch production.
fab auth status
The portal and CLI are complementary. Start in the portal when exploring; switch to the CLI when you need speed, repeatability, or automation.