fabric-cli

Microsoft Fabric CLI


Quick links: Cheatsheet   Examples   Flags  Environment   Release Notes


The Fabric CLI (fab) is a fast, file‑system‑inspired command‑line interface for Microsoft Fabric.
Explore, automate, and script your Fabric environment—right from your terminal.

Key features


🚀 Install

Prerequisite: Make sure Python version 3.10, 3.11, or 3.12 is installed on your machine and that python is accessible from your terminal (PATH environment variable).

pip install ms-fabric-cli

The command installs the latest version of fab on Windows, macOS, and Linux. If you’re upgrading from an earlier version, simply run the same command with ‑‑upgrade.

Need a different method? See the release notes for standalone binaries and package managers as they become available.


🔐 Authenticate

fab supports interactive, service‑principal, and managed‑identity sign‑in.

Identity Type Scenario Command
User Interactive browser login fab auth login. (then select Interactive with a web browser)
Service Principal Secret fab auth login [-u <client_id>] [-p <client_secret>] [--tenant <tenant_id>]
  Certificate fab auth login [-u <client_id>] [--certificate </path/to/certificate.[pem\|p12\|pfx]>] [--tenant <tenant_id>]
  Certificate + password fab auth login [-u <client_id>] [--certificate </path/to/certificate.[pem\|p12\|pfx]>] [-p <certificate_secret>] [--tenant <tenant_id>]
  Federated token fab auth login [-u <client_id>] [--federated-token <token>] [--tenant <tenant_id>]
Managed Identity System‑assigned fab auth login --identity
  User‑assigned fab auth login --identity [-u <client_id>]

For more details and scripts, see the auth examples.


🏁 Run Your First Command

Once you’re signed in, you’re one command away from exploring Fabric.

fab ls           # list workspaces and items

Switch to interactive mode (optional)

fab config set mode interactive
fab auth login   # re‑enter with your last auth method

You’ll drop into a live shell:

Welcome to the Fabric CLI ⚡  Type 'help' for help.
fab:/$ ls

Encrypted cache error?
If you see [AuthenticationFailed] Encrypted cache error on first launch, run:
fab config set encryption_fallback_enabled true and retry.

From here you can run any command—the full list is in the Cheatsheet and deeper scenarios are in Usage examples.


📚 Docs & References


⚙️ What we’re currently working on


💬 Feedback & Support

Have thoughts on the Fabric CLI? We review every submission and your input directly shapes the Fabric CLI roadmap.

Thank you for helping us build the best CLI experience possible!