Azure Document Intelligence for .NET
Guides .NET developers in extracting structured data from invoices, receipts, IDs, and forms.
The skill names endpoint, API-key, Entra credential, and Blob SAS configuration and recommends DefaultAzureCredential in production, providing basic data-flow transparency. However, it enables API keys and SAS directly without guidance on sensitive-document handling, key rotation, least-privilege RBAC, external read/upload effects, confirmation before model deletion, or rollback, so points are deducted.
Installation, authentication, analysis, classification, training, model management, and basic exception handling are documented, making the happy path plausible. Static evidence lacks skill-specific tests and executable verification, and does not address missing environment variables, invalid URIs, authorization failures, long-running-operation failures, missing fields, or version compatibility; model deletion also lacks safeguards.
The description, trigger phrases, main scenarios, and .NET package scope are reasonably clear, covering invoices, receipts, IDs, forms, and custom models. It does not define non-fit cases, input limits, output contracts, regional/service availability, Chinese-language support, or mainland-China reachability, so points are deducted.
The file has standard SKILL.md metadata, MIT licensing, a version, installation notes, layered sections, examples, best practices, error handling, related SDK guidance, and reference links. It lacks a changelog, explicit maintenance responsibility, known limitations, troubleshooting, a compatibility matrix, and update guidance, so it is not full marks.
The C# snippets are directly adaptable and cover text/table extraction, prebuilt models, custom models, classification, and model management, addressing the core SDK task. But they depend on external document URIs, lack a complete runnable project and input validation, omit sensitive-data governance, pagination, retries, and result persistence, and have no skill-specific output verification evidence, warranting a conservative static score.
NuGet, API documentation, samples, and model-reference links provide some traceability. The supplied material contains no committed tests, CI coverage, or third-party execution results for this skill; the repository test evidence is a generic harness rather than coverage of this skill's key paths, so a higher score is not supported.
- Do not hard-code or log API keys, SAS URLs, or sensitive documents such as IDs and invoices; use least-privilege credentials, rotation, and secure storage.
- Add explicit user confirmation, authorization checks, and a recoverable backup or alternative before calling DeleteModelAsync.
- Before adopting the snippets, verify API signatures, field types, regional endpoint requirements, and service quotas against the pinned Azure.AI.DocumentIntelligence version, and add input validation and failure retries.
- The skill does not address mainland-China reachability or Chinese-language resources; validate service endpoints, authentication paths, and document-data compliance before deployment.
What it does & when to use it
This skill provides practical guidance for the Azure.AI.DocumentIntelligence .NET SDK. It covers prebuilt and custom models for extracting text, tables, fields, layout structure, and document classifications. The material includes Microsoft Entra authentication, API-key authentication, long-running operations, and custom model and classifier management. It fits teams already using Azure Document Intelligence and wanting coding agents to produce relevant .NET implementations.
It shows how to install Azure.AI.DocumentIntelligence and Azure.Identity, configure the Document Intelligence endpoint, API key, Blob container SAS URL, and Azure credential environment variables. Examples use DocumentIntelligenceClient to analyze invoices, receipts, identity documents, and general layouts, reading text, lines, words, tables, and fields. They also use DocumentIntelligenceAdministrationClient to build, retrieve, list, and delete custom models and document classifiers. The sample code calls Azure services and produces AnalyzeResult objects, model details, classification results, and confidence values.
- A finance team processes incoming invoices and extracts vendor names, line items, and totals.
- A retail or expense-management application parses merchant names, amounts, and transaction dates from receipts.
- An identity-verification workflow extracts names, dates of birth, and addresses from identity documents.
- A document-processing service extracts page text, tables, selection marks, and layout structure from PDFs or forms.
- An enterprise with fixed or variable document layouts builds and manages custom models and classifiers.
Pros & cons
- Covers concrete workflows for invoices, receipts, identity documents, layout analysis, custom models, and classifiers.
- Provides examples for both API-key and Microsoft Entra authentication.
- Includes client types, prebuilt models, key types, build modes, and error handling.
- Explicitly recommends reusing thread-safe clients and checking field confidence.
- Focused on the Azure.AI.DocumentIntelligence .NET SDK, so it is not suited to non-.NET or non-Azure document-analysis projects.
- Requires an available Azure Document Intelligence endpoint; custom model training also requires a Blob container SAS URL.
- The source does not provide service pricing, quota details, performance benchmarks, or independent testing for specific agent platforms.
- The examples primarily use remote document URIs and do not show local-file input.
How to install
Install the Agent Skills collection with:
npx skills add microsoft/skills
Choose the required skill in the wizard. This skill is located at .github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md. Install the SDK packages with:
dotnet add package Azure.AI.DocumentIntelligence
dotnet add package Azure.Identity
The source does not document separate activation or configuration steps for a specific coding-agent client.
How to use
Ask the coding agent for a task containing one of the documented triggers, for example: "Implement invoice extraction in a .NET app with DocumentIntelligenceClient and check field confidence." You can also request receipt OCR, document-layout extraction, custom document models, or document classifiers. Configure DOCUMENT_INTELLIGENCE_ENDPOINT; API-key authentication additionally requires DOCUMENT_INTELLIGENCE_API_KEY, and production use of DefaultAzureCredential requires AZURE_TOKEN_CREDENTIALS=prod. Microsoft Entra authentication requires a custom-subdomain endpoint rather than a regional endpoint.
Compared to similar skills
The source explicitly identifies Azure.AI.FormRecognizer as a deprecated legacy SDK and recommends DocumentIntelligence for new projects.