Search Consumption CLI
MicrosoftOfficialPublished by Microsoft
- Skill
- Tool integration
- Cloud and DevOps
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The search-consumption-cli skill provides a standardized interface for searching and inventorying items within Microsoft Fabric. By leveraging the Catalog Search API, it enables users to find items by display name, description, or workspace name without needing to know the specific workspace location beforehand. It is designed as a discovery tool to retrieve the necessary item and workspace IDs required for subsequent operations using specialized workload-specific skills.
What it does
- Searches for Fabric items across all workspaces using the Catalog Search API.
- Filters search results by item type to narrow down findings.
- Lists all items of a specific type across the entire tenant.
- Extracts item and workspace IDs for use in downstream operations.
- Handles pagination for large result sets using continuation tokens.
- Provides a mechanism to disambiguate results when multiple items match the search criteria.
When to use it
- When you need to locate a specific Fabric item but do not know which workspace it resides in.
- When you need to perform a tenant-wide inventory of a specific item type.
- When you need to retrieve IDs for an item and its workspace to perform further actions with other tools.
- When you need to filter items by type, such as finding all Lakehouses or Reports.
Advantages
- Enables cross-workspace discovery without manual navigation.
- Reduces complexity by providing a single entry point for item location.
- Supports efficient filtering to minimize noise in search results.
- Integrates cleanly with other Fabric CLI skills for end-to-end workflows.
Usage examples
- “Find the item named 'Monthly Sales Revenue' that is a report.”
- The agent executes a Catalog Search with a filter for 'Report' and returns the item's display name, type, workspace, and unique IDs.
- “List all semantic models in the tenant.”
- The agent performs an empty search with a 'SemanticModel' type filter and returns a comprehensive list of all matching items.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/search-consumption-cli/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip search-consumption-cli.zip -d .agents/skills
Documentation by Microsoft
Telemetry — MANDATORY. Every
api.fabric.microsoft.comcall must carryx-ms-fabric-skill: search-consumption-cli(az rest:--headers "x-ms-fabric-skill=search-consumption-cli"), including every LRO poll,fabric_lroand retry. Snippets omit it — add it anyway.
CRITICAL NOTES
The Catalog Search API finds items, not workspaces. To find a workspace by name, use
GET /v1/workspaces(see COMMON-CLI.md § Resolve Workspace Properties by Name).The search text matches against item display name, description, and workspace name.
Dataflow (Gen1) and Dataflow (Gen2) are not supported.
Catalog Search — CLI Skill
Prerequisite Knowledge
COMMON-CORE.md — Fabric REST API patterns, auth
COMMON-CLI.md — CLI implementation (az, curl, jq)
Table of Contents
| Task | Reference | Notes |
|---|---|---|
| Search for an Item | SKILL.md § Search for an Item | By name, description, or workspace name |
| List All Items of a Type | SKILL.md § List All Items of a Type | Empty search + type filter |
| Pagination | SKILL.md § Pagination | Continuation token pattern |
| Agentic Workflow | SKILL.md § Agentic Workflow | |
| Examples | SKILL.md § Examples | |
| Gotchas and Troubleshooting | SKILL.md § Gotchas and Troubleshooting |
Must/Prefer/Avoid
MUST DO
Authenticate first — see COMMON-CORE.md § Authentication & Token Acquisition and COMMON-CLI.md § Authentication Recipes. The Catalog Search API requires
Catalog.Read.Allscope.Write the JSON body to a temp file — avoids shell quoting issues with filter strings.
Disambiguate — if multiple results match, present display name, type, and workspace name and ask the user to confirm.
PREFER
Catalog Search over list-and-filter — single cross-workspace call, no need to resolve workspace first.
Type filters — narrow results with
"filter": "Type eq 'Lakehouse'"to reduce noise.Empty search with type filter — to list all items of a type across workspaces.
jqfor extracting IDs from the response — cleaner than JMESPath for nestedhierarchy.workspace.
AVOID
Searching for workspaces — the Catalog Search API returns items, not workspaces. Use
GET /v1/workspacesinstead (see COMMON-CLI.md § Resolve Workspace Properties by Name).Querying source data after the workspace/item is known — route to the workload-specific consumption skill (
sqldw-cli,spark-cli,eventhouse-cli, orfabriciq) instead of Catalog Search.Inventing filter syntax — only
eq,ne,or, and parentheses are supported.Assuming all item types are supported — Dataflow (Gen1) and Dataflow (Gen2) are not returned yet.
Search for an Item
cat > /tmp/body.json << 'EOF'
{"search": "SalesLakehouse", "filter": "Type eq 'Lakehouse'", "pageSize": 10}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.jsonThe search text matches against item display name, description and workspace name. Type filtering is optional. The response includes id, type, displayName, description, and hierarchy.workspace (with id and displayName) for each match.
Extract item and workspace IDs
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json \
--query "value[0].{itemId:id, workspaceId:hierarchy.workspace.id, name:displayName}" \
--output jsonFilter Examples
| Goal | Filter |
|---|---|
| Only lakehouses | Type eq 'Lakehouse' |
| Reports or semantic models | Type eq 'Report' or Type eq 'SemanticModel' |
| Exclude notebooks | Type ne 'Notebook' |
For the full list of supported item types, see the Catalog Search API reference.
List All Items of a Type
Use an empty search string with a type filter (pageSize max is 1000):
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 100}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.jsonPagination
If the response includes a non-null continuationToken, pass it in the next request:
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 100, "continuationToken": "<token>"}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.jsonContinue until continuationToken is null.
Agentic Workflow
Ask — user provides an item name, type, or description keywords.
Search — call Catalog Search with the user's input and optional type filter.
Disambiguate — if multiple matches, present results (name, type, workspace) and ask the user to pick.
Return — provide the search results, include the item
idandhierarchy.workspace.idfor downstream use.
Examples
Find a specific report
cat > /tmp/body.json << 'EOF'
{"search": "Monthly Sales Revenue", "filter": "Type eq 'Report'", "pageSize": 10}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json \
--query "value[].{name:displayName, type:type, workspace:hierarchy.workspace.displayName}" \
--output tableList all semantic models across workspaces
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'SemanticModel'", "pageSize": 1000}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.jsonSave search results to file
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 1000}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json \
--query "value[].{name:displayName, type:type, workspace:hierarchy.workspace.displayName, id:id}" \
--output json > /tmp/search_results.jsonGotchas and Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
401 Unauthorized | Wrong token audience or expired session | Verify --resource "https://api.fabric.microsoft.com". Run az login. |
InvalidPageSize | pageSize outside 1–1000 | Use a value between 1 and 1000. |
InvalidFilter | Bad filter syntax | Only eq, ne, or, and parentheses. Don't mix eq with and, or ne with or. Don't mix eq and ne in the same filter. |
TypeNotFound | Unrecognized item type in filter | Check spelling (case-sensitive). See API reference for valid types. |
FilterTooManyValues | Filter has more than 500 values | Reduce the number of type values in the filter. |
InvalidRequest | Missing request body | Ensure --body points to a valid JSON file. |
| Empty results for known item | Item type not supported | Dataflow Gen1/Gen2 are excluded. Use GET /v1/workspaces/{id}/items instead. |
| New item not found | Catalog index propagation delay | Indexing lag is variable and not yet near-real-time — usually minutes, but not guaranteed. A just-created item may not appear in search results yet; verify it exists via GET /v1/workspaces/{id}/items instead. |
| Too many results | Search text too broad | Add a type filter or use more specific search text. |
Files
- ATTRIBUTION.mdAdded by AutoGineer889 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md8.6 KiB
- apm.yml462 B
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills-for-fabric · skills/search-consumption-cli · commit f8fac11
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Also distributed in
- microsoft/skills-for-fabric
AutoGineer is not affiliated with or endorsed by Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download search-consumption-cli.zip