Fabric CLI, or fab
, is a command-line interface to Microsoft Fabric for use in your terminal or your scripts.
Check the release notes to see the latest updates and changes.
To install using pip
, you must have Python version 3.10 or later installed.
$ pip install ms-fabric-cli
Fabric CLI supports interactive, service principal and managed identity authentication.
Note: Business-to-business (B2B) authentication is not supported.
To authenticate using user identity, run:
$ fab auth login
? How would you like to authenticate Fabric CLI? Interactive with a web browser
To use service principal authentication with secret, run:
$ fab auth login [-u <client_id>] [-p <client_secret>] [--tenant <tenant_id>]
To use service principal authentication with certificate, run:
$ fab auth login [-u <client_id>] [--certificate </path/to/certificate.[pem|p12|pfx]>] [--tenant <tenant_id>]
To use service principal authentication with certificate and certificate password, run:
$ fab auth login [-u <client_id>] [--certificate </path/to/certificate.[pem|p12|pfx]>] [-p <certificate_secret>] [--tenant <tenant_id>]
To use system assigned managed identity authentication, run:
$ fab auth login --identity
To use user assigned managed identity authentication, run:
$ fab auth login --identity [-u <client_id>]
Once authenticated, if you get [AuthenticationFailed] Encrypted cache error
(if not skip this), run:
$ fab config set encryption_fallback_enabled true
Run your first command:
$ fab ls
To enter interactive mode, set it as the default mode for the CLI:
$ fab config set mode interactive
Type fab auth login
again and the same auth method previously used to enter fab
.
$ fab auth login
? How would you like to authenticate Fabric CLI? Interactive with a web browser
! Using auth tokens in plain text
Welcome to the Fabric CLI ⚡
Type 'help' for help.
fab:/$ help
Run the same commands in interactive mode:
fab:/$ ls
See Cheatsheet and Usage examples.