azd) extension for Azure Document Intelligence and Content Understanding in Foundry Tools.
Before you fire up Windows Terminal and expect a brand-new set of Document Intelligence-only commands to magically appear, though, let us put on our investigative journalist hat and separate the marquee headline from what Microsoft’s live engineering documentation actually puts in your hands today. While the Azure Updates listing itself carries minimal public text beyond its title and preview status, Microsoft Learn documentation and Microsoft’s official Azure/azure-dev GitHub repository thoroughly document the azure.ai.content-understanding extension—exposed under the azd ai cu command group—and reveal how Document Intelligence fits into this terminal-first puzzle.
Why Terminal-First Document Extraction Matters Now
For years, automating document extraction on Azure meant picking a language SDK, configuring a service client, writing asynchronous polling loops, and keeping up with shifting authentication patterns. That friction makes total sense when you are shipping a production microservice, yet it feels like bringing a bulldozer to plant a daisy when you just want to test an invoice schema, inspect layout parsing, or feed clean Markdown into an AI agent pipeline.
Microsoft’s answer is to move document and multimodal analysis directly into the Azure Developer CLI (azd) ecosystem. According to Microsoft Learn’s Content Understanding release notes, the standalone Python-based cu-cli distributed via PyPI as part of the Content Understanding Toolkit is now planned for deprecation, with Microsoft explicitly steering developers to azd ai cu for all new command-line workflows.
Even better for Windows IT pros and polyglot engineering teams, the azd ai cu extension runs natively in both PowerShell and Bash with zero requirement for Python, a language SDK, or an initialized azd project. You install one extension, point it at an existing Microsoft Foundry resource, and start extracting structured text, tables, and fields straight from your shell.
- Section takeaway: Microsoft is consolidating its command-line document AI tooling into
azd, retiring the older PyPI-basedcu-cliin favor of a native, cross-shell extension that needs no local language runtime.
Modular Packaging and the Document Intelligence Connection
One detail that trips up developers exploring Foundry tooling is assuming a single install command gives them everything under the azd ai sun. Microsoft’s Foundry extension installation guide makes clear that the microsoft.foundry meta-package bundles only seven core extensions—covering agents, connections, the local browser inspector, projects, routines, skills, and toolboxes.
The Content Understanding extension lives outside that core bundle as an independently versioned, optional module. If you run azd ext install microsoft.foundry, you will not get azd ai cu automatically; you have to opt in separately.
| Extension ID | Command Group | Included in microsoft.foundry? | Primary Role |
|---|---|---|---|
microsoft.foundry | Meta-package | N/A | Installs the seven core Foundry agent extensions |
azure.ai.agents | azd ai agent | Yes | Build, run, evaluate, and ship Foundry agents |
azure.ai.projects | azd ai project | Yes | Manage Foundry project resources, models, and endpoints |
azure.ai.content-understanding | azd ai cu | No (Optional) | Analyze documents, images, audio, and video (Preview) |
azure.ai.evaluations | azd ai eval | No (Optional) | Run project evaluations and CI quality gates |
azure.ai.finetune | azd ai finetuning | No (Optional) | Submit and manage fine-tuning jobs |
So where does Azure Document Intelligence fit into all of this? Microsoft’s release notes explain that Content Understanding brings key Document Intelligence capabilities directly into its analyzer catalog through prebuilt models such as prebuilt-read, prebuilt-layout, and prebuilt-layoutWithFigures. Furthermore, Microsoft Learn documentation confirms that Content Understanding supports asynchronous PDF and TIFF analysis up to 2,000 pages (with a five-page limit for synchronous calls) and allows page-range selection and multi-section routing.
However, editorial honesty requires an important caveat: the verified Microsoft Learn quickstart and the Azure/azure-dev extension source explicitly expose the azd ai cu namespace for Content Understanding. Current public documentation does not detail a separate standalone azd command group exclusively for legacy Document Intelligence APIs, nor does it state that existing Document Intelligence SDK workloads must migrate. For now, teams looking to tap Document Intelligence-style layout and OCR extraction from azd will be doing so through Content Understanding’s prebuilt analyzers.
- Section takeaway:
azure.ai.content-understandingis an optionalazdmodule outside themicrosoft.foundrybundle, delivering Document Intelligence’s core layout and OCR strengths viaprebuilt-readandprebuilt-layout.
Preview Status vs. API Stability—and the RBAC Trap
Here is a subtlety that will save cloud architects from some awkward compliance meetings: the CLI extension is in public preview, but the backend API it talks to is generally available.
Microsoft’s documentation stresses that preview releases are provided without a service-level agreement (SLA) and are not recommended for production workloads. Yet by default, azd ai cu targets the 2025-11-01 GA service API—not the separate 2026-06-01-preview API (which introduces experimental features like agentic document mode, signature detection, and synchronous Read/Layout operations). Understanding that split matters: you can safely evaluate the GA service behavior from your terminal while keeping the preview CLI binary out of mission-critical production pipelines until it hits general availability.
Just as important is how permissions work. Many Azure admins assume that having the Contributor role on a resource group or Foundry resource lets them run test commands against it. Microsoft explicitly warns that Contributor alone does not grant Content Understanding data-plane access. You need the Cognitive Services User role on the Microsoft Foundry resource (or equivalent data-plane permissions such as the dedicated Cognitive Service Content Understanding Owner, Contributor, or Reader built-in RBAC roles introduced in May 2026).
Finally, leave your API keys at the door. In the documented Microsoft Learn quickstart workflow, the extension authenticates exclusively through Microsoft Entra ID via azd auth login; API-key authentication is not supported.
- Section takeaway: The preview label applies to the CLI wrapper, which defaults to the GA
2025-11-01API; make sure your Entra ID account holdsCognitive Services User(not justContributor) before running commands.
Hands-On Walkthrough: Installing and Running azd ai cu
Ready to kick the tires on Windows PowerShell or Bash? Assuming you already have a Microsoft Foundry resource deployed in a supported region and hold the Cognitive Services User role on it, here is the verified workflow from Microsoft Learn’s quickstart.
1. Verify azd and Install the Extension
The extension requires Azure Developer CLI version 1.37.0 or later. Confirm your version, install the extension, and verify the installed build:
azd version
azd ext install azure.ai.content-understanding
azd ai cu version
Microsoft’s quickstart shows azure.ai.content-understanding 0.1.0-preview in its reference output, though your exact preview build number may advance as updates ship (for instance, Azure/azure-dev issue tracking already shows follow-up work toward 0.1.1-preview to expand interactive infrastructure prompts).
2. Authenticate and Point to Your Foundry Resource
Grab your resource endpoint from the Azure portal—for example, https://<resource-name>.services.ai.azure.com/—and do not use a Foundry project URL or an API operation URL. Check if you already have a saved endpoint before overwriting it, then log in, set the endpoint, and run the built-in diagnostics check:
azd auth login
azd ai cu config get CU_ENDPOINT
azd ai cu config set CU_ENDPOINT "<your-resource-endpoint>"
azd ai cu doctor
If azd ai cu doctor warns that generative model defaults are missing, do not panic—Microsoft notes that model-free analyzers like prebuilt-layout and prebuilt-read work fine without language or embedding model deployments configured.
3. Download a Sample and Run Your First Analysis
Grab Microsoft’s sample invoice PDF into a writable working folder using PowerShell:
$sampleRoot = "[url]https://raw.githubusercontent.com/Azure-Samples[/url]"
$samplePath = "azure-ai-content-understanding-assets/main/document/invoice.pdf"
Invoke-WebRequest -Uri "$sampleRoot/$samplePath" -OutFile invoice.pdf
(In Bash, use curl --fail --location --output invoice.pdf against the same URL.)
Now run the analyzer:
azd ai cu analyze invoice.pdf
Without a configured default analyzer, the CLI uses prebuilt-layout. It uploads the PDF to your Azure resource and prints YAML front matter followed by extracted Markdown (note that complex tables may render as HTML blocks inside the Markdown output).
4. Save Markdown or JSON Results—With a Billing Caveat
To write the output to disk, pass --output-file:
azd ai cu analyze invoice.pdf --analyzer prebuilt-layout --output-file out.md
azd ai cu analyze invoice.pdf -a prebuilt-layout -o json --output-file out.json
Pay close attention to Microsoft’s warning here: each analyze command submits a brand-new cloud analysis and can incur Azure charges. Running the JSON command does not export the result from the Markdown run you executed ten seconds earlier. In the JSON output, the extracted Markdown lives at result.contents[0].markdown, accompanied by full layout metadata, usage stats, and any service warnings. When you finish testing, if you only set the endpoint temporarily, clean it up with azd ai cu config unset CU_ENDPOINT (or restore your previous endpoint).
- Section takeaway: Installation and initial document parsing take under five minutes on
azd1.37.0+, require zero local SDKs, and output clean Markdown or full JSON responses.
Beyond Single Files: Batch Runs, Dry Runs, and Custom Analyzers
If azd ai cu stopped at single-file quickstarts, it would be a neat party trick. Digging into Microsoft’s Azure/azure-dev extension documentation reveals a much deeper toolkit aimed at real engineering workflows:
- Batch Directory Processing: Point the CLI at an entire local folder tree with
--source./documents --pattern "*.pdf" --recursive, write mirrored outputs to--output-dir./results, and capture per-file successes, failures, and skips in a--report-file./report.json. Concurrency defaults to 4 parallel workers and scales from 1 to 32 via--concurrency. - Cost Guardrails: Any batch exceeding 50 inputs triggers an interactive cost confirmation prompt unless you pass
--yes. Even better,--dry-runlets you inspect the execution plan before making a single paid service call or writing files. - Remote URL and Blob Ingestion: Need to parse files sitting in Azure Storage without downloading them to your laptop first? Pass
--urlwith an HTTPS or Azure Blob SAS URL. - Custom Analyzer Lifecycle & Infra Scaffolding: Beyond
analyze, the extension exposesazd ai cu analyzersubcommands (validate --spec --strict,create,test) for iterating on JSON extraction schemas, plusazd ai cu infra generateto scaffold a self-containedazdand Bicep deployment project without immediately executingazd up. - Predictable Configuration Precedence: Settings use exact, case-sensitive names—
CU_ENDPOINT,CU_DEFAULT_ANALYZER, andCU_API_VERSION—resolved in strict order: explicit flags, then process environment variables, then activeazdproject environment values, and finally saved user defaults. - Section takeaway: The extension’s batch flags,
--dry-runsafety checks, Blob SAS ingestion, and Bicep scaffolding turn it into a practical automation utility rather than just a quickstart toy.
Troubleshooting Common Pitfalls
Even veteran Azure engineers hit snags when wiring up new CLI previews. Keep this quick reference handy when things go sideways:
| Symptom | Root Cause | Verified Fix |
|---|---|---|
azd ai cu command not recognized | azd is older than 1.37.0 or extension is missing | Upgrade azd to 1.37.0+ and run azd ext install azure.ai.content-understanding |
| Authentication or authorization failure | Expired session or missing data-plane RBAC role | Run azd auth login and verify Cognitive Services User (not just Contributor) on the resource |
| Endpoint validation error | Used a Foundry project URL or operation URL | Switch to the root resource endpoint (https://<name>.services.ai.azure.com/) |
| Command hits the wrong Azure resource | Shell variable or local azd env overrides user default | Run azd ai cu doctor to inspect the effective endpoint and which layer set it |
doctor warns on missing generative defaults | Foundry resource lacks LLM/embedding deployments | Safe to ignore for prebuilt-layout, prebuilt-read, and prebuilt-digitalParse; deploy models only for generative analyzers |
| Output file already exists error | Default safety prevents accidental overwrite or re-billing | Choose a new filename, add --on-existing skip to keep it, or use --on-existing reanalyze to replace |
The Bottom Line for Windows Developers and IT Pros
Bringing Content Understanding—and the Document Intelligence prebuilt extraction engines embedded inside it—into the Azure Developer CLI is a smart, pragmatic move by Microsoft. By shedding the Python dependency of the soon-to-be-deprecated cu-cli and aligning authentication directly with Entra ID via azd auth login, Microsoft has made document-to-Markdown pipelines far more approachable from a standard Windows PowerShell prompt.
Still, keep both eyes open before wiring azd ai cu into automated enterprise jobs. The extension carries an explicit preview label with no SLA, interactive infrastructure workflows are still maturing in Azure/azure-dev, and anyone hoping for dedicated Document Intelligence-branded CLI subcommands outside Content Understanding’s prebuilt-read and prebuilt-layout analyzers will need to watch Microsoft’s upcoming documentation updates. As a zero-boilerplate way to test layouts, validate custom JSON schemas, and batch-convert stubborn PDFs into LLM-ready Markdown, though, azd ai cu is already one of the handiest additions to the Foundry toolchain.
References
- (In preview) Public Preview: Azure Developer CLI extension for Azure Document Intelligence and Content Understanding in Foundry Tools Azure Updates · 2026-11-24T16:45:59Z
- github.com github.com
- microsoft.com learn.microsoft.com