Generated banner for Search Consumption CLI
Generated logo for Search Consumption CLI

Search Consumption CLI

MicrosoftOfficialPublished by Microsoft

  • Skill
  • Tool integration
  • Cloud and DevOps
  • MIT
  • No issues found

From the author

Finds Fabric items across every workspace with the Catalog Search API when the workspace is unknown, locating an item by display name, inventorying one item type tenant-wide, and returning the workspace and item IDs later calls need. Dataflow Gen1 and Gen2 items are not supported. Use only to locate items; once found, query them with the owning item skill such as sqldw-cli, spark-cli, eventhouse-cli or fabriciq.
— the description by Microsoft

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/search-consumption-cli/download
  2. Unzip 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.com call must carry x-ms-fabric-skill: search-consumption-cli (az rest: --headers "x-ms-fabric-skill=search-consumption-cli"), including every LRO poll, fabric_lro and retry. Snippets omit it — add it anyway.

CRITICAL NOTES

  1. 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).

  2. The search text matches against item display name, description, and workspace name.

  3. 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

TaskReferenceNotes
Search for an ItemSKILL.md § Search for an ItemBy name, description, or workspace name
List All Items of a TypeSKILL.md § List All Items of a TypeEmpty search + type filter
PaginationSKILL.md § PaginationContinuation token pattern
Agentic WorkflowSKILL.md § Agentic Workflow
ExamplesSKILL.md § Examples
Gotchas and TroubleshootingSKILL.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.All scope.

  • 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.

  • jq for extracting IDs from the response — cleaner than JMESPath for nested hierarchy.workspace.

AVOID
  • Searching for workspaces — the Catalog Search API returns items, not workspaces. Use GET /v1/workspaces instead (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, or fabriciq) 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.json

The 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 json

Filter Examples
GoalFilter
Only lakehousesType eq 'Lakehouse'
Reports or semantic modelsType eq 'Report' or Type eq 'SemanticModel'
Exclude notebooksType 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.json

Pagination

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.json

Continue until continuationToken is null.


Agentic Workflow

  1. Ask — user provides an item name, type, or description keywords.

  2. Search — call Catalog Search with the user's input and optional type filter.

  3. Disambiguate — if multiple matches, present results (name, type, workspace) and ask the user to pick.

  4. Return — provide the search results, include the item id and hierarchy.workspace.id for 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 table
List 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.json
Save 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.json

Gotchas and Troubleshooting

SymptomCauseFix
401 UnauthorizedWrong token audience or expired sessionVerify --resource "https://api.fabric.microsoft.com". Run az login.
InvalidPageSizepageSize outside 1–1000Use a value between 1 and 1000.
InvalidFilterBad filter syntaxOnly 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.
TypeNotFoundUnrecognized item type in filterCheck spelling (case-sensitive). See API reference for valid types.
FilterTooManyValuesFilter has more than 500 valuesReduce the number of type values in the filter.
InvalidRequestMissing request bodyEnsure --body points to a valid JSON file.
Empty results for known itemItem type not supportedDataflow Gen1/Gen2 are excluded. Use GET /v1/workspaces/{id}/items instead.
New item not foundCatalog index propagation delayIndexing 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 resultsSearch text too broadAdd a type filter or use more specific search text.

Files

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