Skills-for-fabric powerbi-consumption-cli
install
source · Clone the upstream repo
git clone https://github.com/microsoft/skills-for-fabric
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/microsoft/skills-for-fabric "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/powerbi-consumption-cli" ~/.claude/skills/microsoft-skills-for-fabric-powerbi-consumption-cli && rm -rf "$T"
manifest:
skills/powerbi-consumption-cli/SKILL.mdsource content
Update Check — ONCE PER SESSION (mandatory) The first time this skill is used in a session, run the check-updates skill before proceeding.
- GitHub Copilot CLI / VS Code: invoke the
skill.check-updates- Claude Code / Cowork / Cursor / Windsurf / Codex: compare local vs remote package.json version.
- Skip if the check was already performed earlier in this session.
CRITICAL NOTES
- To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering
- To find the item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace and, then, use JMESPath filtering
Power BI Semantic Model Consumption — CLI Skill
Table of Contents
| Task | Reference | Notes |
|---|---|---|
| Finding Workspaces and Items in Fabric | COMMON-CLI.md § Finding Workspaces and Items in Fabric | Mandatory — READ link first [needed for finding workspace id by its name or item id by its name, item type, and workspace id] |
| Fabric Topology & Key Concepts | COMMON-CORE.md § Fabric Topology & Key Concepts | Hierarchy; Finding Things in Fabric |
| Environment URLs | COMMON-CORE.md § Environment URLs | Production (Public Cloud) |
| Authentication & Token Acquisition | COMMON-CORE.md § Authentication & Token Acquisition | Wrong audience = 401; covers token audiences, delegated vs app permissions, OAuth flows, identity types, and Entra app registration |
| Core Control-Plane REST APIs | COMMON-CORE.md § Core Control-Plane REST APIs | Includes workspace/item CRUD, resolve-by-name, pagination, LRO polling, and rate-limiting patterns |
| OneLake Data Access | COMMON-CORE.md § OneLake Data Access | Requires token, not Fabric token; covers URL structure, ADLS Gen2 parity, and shortcuts |
| Job Execution | COMMON-CORE.md § Job Execution | Run On-Demand Job; Get / Cancel Job |
| Capacity Management | COMMON-CORE.md § Capacity Management | List Capacities; Assign Workspace to Capacity |
| Gotchas, Best Practices & Troubleshooting | COMMON-CORE.md § Gotchas, Best Practices & Troubleshooting | Common Errors; Best Practices |
| Tool Selection Rationale | COMMON-CLI.md § Tool Selection Rationale | |
| Authentication Recipes | COMMON-CLI.md § Authentication Recipes | flows, environment detection, token acquisition, and debugging |
Fabric Control-Plane API via | COMMON-CLI.md § Fabric Control-Plane API via | Always pass ; includes workspace/item operations, pagination, and LRO patterns |
OneLake Data Access via | COMMON-CLI.md § OneLake Data Access via | Use not (different token audience); file list/read/upload/delete and directory creation |
| SQL / TDS Data-Plane Access | COMMON-CLI.md § SQL / TDS Data-Plane Access | (Go) connect, query, CSV export, service principal auth, and connection parameter discovery |
| Job Execution (CLI) | COMMON-CLI.md § Job Execution | Run notebooks/pipelines, refresh semantic models, check/cancel jobs |
| OneLake Shortcuts | COMMON-CLI.md § OneLake Shortcuts | Create a Shortcut; List Shortcuts; Delete a Shortcut |
| Capacity Management (CLI) | COMMON-CLI.md § Capacity Management | List Capacities; Assign Workspace to Capacity |
| Composite Recipes | COMMON-CLI.md § Composite Recipes | End-to-end workspace→lakehouse→file, SQL endpoint→query, and notebook execution recipes |
| Gotchas & Troubleshooting (CLI-Specific) | COMMON-CLI.md § Gotchas & Troubleshooting (CLI-Specific) | |
| Quick Reference | COMMON-CLI.md § Quick Reference | Template; Token Audience ↔ CLI Tool Matrix |
| Prerequisites | SKILL.md § Prerequisites | |
| Must/Prefer/Avoid | SKILL.md § Must/Prefer/Avoid | Guardrails for read-only semantic model usage. MUST DO; PREFER; AVOID |
| Metadata Discovery | SKILL.md § Metadata Discovery | INFO.VIEW.* and INFO.* functions. |
| Recommended Discovery Order | SKILL.md § Recommended Discovery Order | Preferred order for metadata exploration |
| Frequently Used INFO Functions | SKILL.md § Frequently Used INFO Functions | High-usage function list for first-pass discovery |
| Complete INFO Function Catalog (Dynamic) | discovery-queries.md § Complete INFO Function Catalog (Dynamic) | |
| Metadata Object → INFO Function Map | SKILL.md § Metadata Object → INFO Function Map | Inlined mapping for object-focused discovery |
| Query Execution | SKILL.md § Query Execution | ExecuteQuery usage shape |
| Troubleshooting | SKILL.md § Troubleshooting | Resolve common execution and metadata issues |
| Examples | SKILL.md § Examples | Sample Metadata Query; Sample Data Query |
| Scope Estimation Queries | discovery-queries.md § Scope Estimation Queries | |
| INFO Output Columns | discovery-queries.md § INFO Output Columns | INFO.VIEW.* (preferred first-pass metadata); Critical INFO.* (deep metadata / diagnostics) |
| Narrowing Results (Projection + Filtering) | discovery-queries.md § Narrowing Results (Projection + Filtering) | |
| Deep Metadata Queries | discovery-queries.md § Deep Metadata Queries | |
| Dependency Discovery | discovery-queries.md § Dependency Discovery | Dependency rowset for a DAX query; Dependency rows scoped to a measure; Reverse dependencies (what references a measure) |
Prerequisites
- COMMON-CORE.md — Fabric concepts, authentication, and control-plane API context.
- COMMON-CLI.md — CLI-oriented discovery and token/audience patterns.
Must/Prefer/Avoid
MUST DO
- Keep this skill read-only: metadata discovery and analytical DAX queries only.
- Treat DAX data queries and
as available to any user with read access to the semantic model; assume otherINFO.VIEW.*
functions may require elevated permissions.INFO.* - Resolve workspace and semantic model item identity dynamically; do not hardcode IDs.
- Use DAX
/INFO.VIEW.*
for metadata discovery before writing data queries.INFO.*
PREFER
- Validate semantic model scope early (
) before iterative query refinement.artifactId - Discover semantic model schema progressively: use filtered and projected
/INFO.VIEW.*
calls (e.g.,INFO.*
+SELECTCOLUMNS
) to fetch only the information directly relevant to the current task instead of retrieving the full schema up front. See discovery-queries.md § Narrowing Results (Projection + Filtering).FILTER - Keep guidance provider-agnostic so tool endpoint migration is low risk.
AVOID
- Model-change operations in this skill.
Recommended Discovery Order
- Run the discovery-queries.md § Scope Estimation Queries to estimate metadata scope (table, column, measure, and relationship counts) before deep discovery.
- Start with
for a fast table inventory.INFO.VIEW.TABLES() - Expand to
andINFO.VIEW.COLUMNS()
for semantic details.INFO.VIEW.MEASURES() - Use
to validate joins and filter behavior.INFO.VIEW.RELATIONSHIPS() - Use the full query catalog in discovery-queries.md for deeper patterns.
Frequently Used INFO Functions
INFO.VIEW.TABLESINFO.VIEW.MEASURESINFO.VIEW.COLUMNSINFO.VIEW.RELATIONSHIPSINFO.PARTITIONSINFO.MODELINFO.STORAGETABLECOLUMNSEGMENTSINFO.DEPENDENCIESINFO.EXPRESSIONSINFO.ROLESINFO.STORAGETABLECOLUMNSINFO.CALCULATIONGROUPSINFO.CALCULATIONITEMSINFO.CULTURESINFO.OBJECTTRANSLATIONSINFO.USERDEFINEDFUNCTIONSINFO.REFRESHPOLICIESINFO.ATTRIBUTEHIERARCHYSTORAGESINFO.COLUMNPARTITIONSTORAGESINFO.COLUMNSTORAGESINFO.DICTIONARYSTORAGESINFO.HIERARCHYSTORAGESINFO.PARTITIONSTORAGESINFO.RELATIONSHIPINDEXSTORAGESINFO.RELATIONSHIPSTORAGESINFO.SEGMENTMAPSTORAGESINFO.SEGMENTSTORAGESINFO.STORAGEFOLDERSINFO.STORAGEFILESINFO.TABLESTORAGESINFO.GENERALSEGMENTMAPSEGMENTMETADATASTORAGESINFO.DELTATABLEMETADATASTORAGESINFO.PARQUETFILESTORAGESINFO.STORAGETABLES
Metadata Object → INFO Function Map
| Metadata Object | Primary INFO functions |
|---|---|
| Model | |
| Tables | |
| Columns | , , |
| Measures | , , |
| Relationships | |
| Partitions | , , , , |
| Security roles & permissions | , , |
| Hierarchies | , , , |
| Calculation groups/items | , , |
| Perspectives | , , , , |
| Calendars | , , |
| Cultures | |
| Object translations | |
| Functions | |
| Dependencies / lineage | , , |
| Storage internals / size | , , , , , , , , , , , , , , , , , , |
Query Execution
Use a single
ExecuteQuery capability with payload concepts:
: target semantic model identifier.artifactId
: direct DAX query text.daxQuery
Temporary implementation note: current query integration is expected to be replaced before release by a public HTTP endpoint exposing
.ExecuteQuery
Troubleshooting
- ExecuteQuery capability is unavailable in the MCP server
- Issue: Query execution cannot start because
is not available in the active tool list.ExecuteQuery - Cause: The Fabric MCP server is not registered, not loaded, or the current client session has stale tool metadata.
- Fix: Verify the active MCP server/tool inventory and confirm
is exposed.ExecuteQuery
- Issue: Query execution cannot start because
- Advanced INFO functions return permission errors
- Issue: Queries against
fail with authorization or privilege-related errors.INFO.* - Cause: Many
functions require elevated semantic model permissions beyond standard read access.INFO.* - Fix: Start with
functions for read-oriented discovery.INFO.VIEW.*
- Issue: Queries against
- Metadata output volume is too large for focused analysis
- Issue: Returning full metadata rowsets introduces too many properties and crowds the working context.
- Cause: Unbounded
andINFO.VIEW.*
queries return broad object/property surfaces that are often unnecessary for the current task.INFO.* - Fix: Use the scope estimation queries in discovery-queries.md § Scope Estimation Queries to estimate scope and inspect output schemas, then narrow results with projection and filtering as shown in discovery-queries.md § Narrowing Results (Projection + Filtering).
- Do not use
DAX functions to retrieve role membershipsINFO- Issue:
returns empty or incomplete results.INFO.ROLEMEMBERSHIPS() - Cause: Role members are assigned at the service level (Entra ID) after deployment, not in the model definition — so DAX
functions cannot reliably surface them.INFO - Fix: Use the Power BI REST API instead. See powerbi-authoring-cli § Security Role Memberships.
- Issue:
Examples
For the full query catalog (including dependency patterns), see discovery-queries.md.
Sample Metadata Query
EVALUATE INFO.VIEW.TABLES() ORDER BY [Name]
Sample Data Query
DEFINE MEASURE 'Sales'[Total Sales] = SUM('Sales'[Amount]) EVALUATE SUMMARIZECOLUMNS( 'Customer'[Customer Name], "Total Sales", [Total Sales] ) ORDER BY [Total Sales] DESC