The Microsoft Fabric Extension for Azure DevOps brings first-class Fabric automation directly into your ADO pipelines. It adds the FabricCLI@0 task, which automatically provisions the Fabric CLI (fab) into the pipeline agent — no manual installation required.
Use it to provision workspaces, deploy items, manage Git integration, trigger deployment pipelines, and fully automate your Fabric CI/CD workflows.
Quick Start
-
Install the extension from the Azure DevOps Marketplace
-
Create a variable group named
FabricSecretsin ADO → Pipelines → Library:Variable Description Secret? FAB_SPN_CLIENT_IDService principal / managed identity client ID No FAB_TENANT_IDMicrosoft Entra tenant ID No FAB_CAPACITY_NAMETarget Fabric capacity name No Note: No secrets are stored in the variable group. Authentication uses workload identity federation — the federated token will need to be provided at pipeline runtime.
-
Add the task to your pipeline YAML:
variables:
- group: FabricSecrets
steps:
# A federated token from the ADO workload identity service connection will be required for authentication.
# See: https://learn.microsoft.com/en-us/azure/devops/pipelines/release/configure-workload-identity
- task: FabricCLI@0
displayName: 'Create Fabric Workspace'
env:
FAB_SPN_CLIENT_ID: $(FAB_SPN_CLIENT_ID)
FAB_TENANT_ID: $(FAB_TENANT_ID)
FAB_SPN_FEDERATED_TOKEN: $(FEDERATED_TOKEN)
inputs:
scriptType: inlineScript
FabricCLIVersion: V1.5.0
inlineScript: |
fab mkdir "MyWorkspace.Workspace" -P capacityname=$FAB_CAPACITY_NAME
See Get started for a complete walkthrough.
Features
- Zero-setup Fabric CLI — the
fabCLI is automatically provisioned by the task; nopip installneeded. - Multi-platform scripting — supports PowerShell, PowerShell Core, Bash, and Batch script types.
- Inline or file-based scripts — embed commands directly in YAML or point to a
.ps1/.shfile in your repo. - Workspace management — create, configure, and assign Fabric workspaces to capacities.
- Item deployment — publish notebooks, lakehouses, semantic models, pipelines, and more.
- Git integration — connect workspaces to ADO Git, commit changes, and sync from branches.
- Deployment pipelines — trigger stage promotions (Dev → Test → Prod) from CI/CD.
- Version-pinned CLI — pin a specific
FabricCLIVersionfor deterministic, reproducible builds.
Task Reference
The extension provides one task: FabricCLI@0.
| Input | Type | Required | Description |
|---|---|---|---|
scriptLanguage |
string | Yes | ps, pscore, bash, batch |
scriptType |
string | Yes | inlineScript, scriptPath |
inlineScript |
string | When scriptType: inlineScript |
Script content embedded in YAML |
scriptPath |
string | When using file path | Path to .ps1, .sh, or .bat in source |
FabricCLIVersion |
string | Yes | Pin CLI version, e.g. v1.5.0. |
Full reference: Docs/task_reference.md
Documentation
| Guide | Description |
|---|---|
| Get Started | Installation, authentication, first pipeline |
| Task Reference | All FabricCLI@0 inputs and options |
| Samples | End-to-end YAML pipeline examples |
| Permissions | Required roles and identity setup |
| Guide | Description |
| --- | --- |
| Troubleshooting | Common errors and fixes |
| Overview | Extension overview and marketplace details |
Usage
Inline script example (Bash):
- task: FabricCLI@0
env:
FAB_SPN_CLIENT_ID: $(FAB_SPN_CLIENT_ID)
FAB_TENANT_ID: $(FAB_TENANT_ID)
FAB_SPN_FEDERATED_TOKEN: $(FEDERATED_TOKEN)
inputs:
scriptType: inlineScript
inlineScript:
fab ls
fab mkdir "Dev-Workspace.Workspace" -P capacityname=$FAB_CAPACITY_NAME
Script file example (PowerShell Core):
- task: FabricCLI@0
inputs:
scriptType: inline
scriptLanguage: pscore
scriptPath: '$(Build.SourcesDirectory)/scripts/deploy-fabric.ps1'
FabricCLIVersion: 'v1.5.0'
For help on any Fabric CLI command, Fabric CLI (fab) documentation
Contribute
See SUPPORT.md for how to report bugs and request features.
- Questions: Stack Overflow — tag
microsoft-fabric - Bug reports: Issues
- Feature requests: Issues → Feature Request