/powerbi-fabric:pbi-setup [--minimal] [--with-fabric] [--with-desktop-check]from powerbi-fabric
Walks through Power BI and Fabric plugin setup: checks prerequisites, installs dependencies, configures Azure AD auth, verifies workspace access, and optionally sets up Fabric notebooks and Power BI Desktop.
Ships in powerbi-fabric. Installing the plugin adds it to Claude Code.
Guide the user through setting up Power BI and Fabric access. Follow each step in order, asking for input where needed. Respect flag arguments:
--minimal -- Only run steps 1-2 (prerequisites and Node dependencies), then output the summary.--with-fabric -- Include steps 6-7 (Fabric capacity and Python dependencies).--with-desktop-check -- Include step 8 (Power BI Desktop verification).Verify that required tools are installed:
node --version and confirm the major version is 18 or higher. If missing or too old, stop and tell the user to install Node.js 18+ from https://nodejs.org.python --version or python3 --version. If missing, note it as a warning but do not block setup. Python is only required for Fabric notebook workflows.Report the detected versions to the user before continuing.
Run the following in the project root (or the user's chosen working directory):
npm init -y && npm install @azure/identity @azure/msal-node node-fetch
Confirm that package.json exists and the three packages appear in dependencies. Report any errors to the user.
Walk the user through registering an application in Microsoft Entra ID (Azure AD). Ask the user to perform these actions in the Azure portal, or confirm they have already done so:
https://analysis.windows.net/powerbi/api):
Dataset.ReadWrite.AllWorkspace.ReadWrite.AllReport.ReadWrite.AllContent.Createhttps://analysis.windows.net/powerbi/api/.default.Ask the user to provide:
Do not log the client secret to the console or store it in any file other than .env. Remind the user to add .env to .gitignore.
Create a .env file in the project root with the values collected in Step 3:
AZURE_TENANT_ID=<tenant-id>
AZURE_CLIENT_ID=<client-id>
AZURE_CLIENT_SECRET=<client-secret>
PBI_WORKSPACE_ID=<optional-default-workspace-id>
PBI_WORKSPACE_ID is optional. Ask the user if they have a default workspace ID they would like to set..gitignore exists and contains .env. If not, add it.Authenticate using the configured credentials and call:
GET https://api.powerbi.com/v1.0/myorg/groups
Use @azure/identity with ClientSecretCredential to obtain a token for scope https://analysis.windows.net/powerbi/api/.default, then make the HTTP request.
Only run this step if --with-fabric is passed or the user opts in when prompted.
Ask the user:
Append the following to .env:
FABRIC_WORKSPACE_ID=<fabric-workspace-id>
FABRIC_LAKEHOUSE_NAME=<lakehouse-name>
Only run this step if --with-fabric is passed or the user opts in.
Requires Python 3.8+ (verified in Step 1). Run:
pip install pyspark delta-spark semantic-link
Report installed versions and any errors.
Only run this step if --with-desktop-check is passed or the user opts in.
Check whether Power BI Desktop is installed:
PBIDesktop.exe in the default install paths (C:\Program Files\Microsoft Power BI Desktop\bin\ or the Microsoft Store variant).Report whether PBIP/PBIX local authoring is available.
Generate a Markdown summary report with:
| Item | Status |
|---|---|
| Node.js version | e.g. v20.11.0 |
| Python version | e.g. 3.11.4 or "not installed" |
| Node packages | installed / failed |
| Azure app registration | configured / not configured |
| Power BI API access | verified (N workspaces) / failed |
| Fabric capacity | configured / skipped |
| Python packages | installed / skipped |
| Power BI Desktop | found / not found / skipped |
List the accessible workspaces if Step 5 succeeded:
| Workspace | ID |
|---|---|
| Sales Analytics | xxxxxxxx-xxxx-... |
| Finance Reports | xxxxxxxx-xxxx-... |
End with next-step suggestions:
/pbi-workspace-create to create a new workspace./pbi-scaffold to scaffold a PBIP project./pbi-fabric-notebook to generate a Fabric notebook.Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
power-bi, fabric, azure-ad, authentication, workspace-configuration
7-day visitors to each command page
19 commands in this plugin
/pbi-calc-groupAuthor a calculation group (time intelligence, currency, or format switching) as TMDL, collapsing repeated measure variants into reusable calculation items./pbi-dashboard-createCreate Power BI dashboards in Fabric with deterministic setup and verification checks./pbi-dataflowScaffold a Fabric Dataflow Gen2 Power Query M definition for common source types with publishing guidance/pbi-dataset-refreshGenerate TypeScript code to trigger a Power BI dataset refresh and poll for completion status via the REST API./pbi-deploy-pipelineGenerate TypeScript for Azure DevOps / Power BI deployment pipeline automation — list pipeline stages and artifacts, deploy datasets and reports from Dev→Test or Test→Prod, and poll the operation until complete.
/pbi-direct-lake-modelGenerate TMDL for a Direct Lake semantic model over a Fabric Lakehousenpx claudepluginhub thelobbi/claude-m --plugin powerbi-fabricOther plugins' commands for the same job