Azure Event Grid for .NET
Practical .NET guidance for publishing, receiving, and processing Azure Event Grid events.
The document covers API key, SAS, and Entra ID authentication and recommends managed identity in production, providing basic credential and data-flow transparency. However, it still presents keys and SAS prominently, lacks explicit user confirmation, least-privilege guidance, sensitive-data handling, duplicate-send warnings, and rollback details for publishing and failover, so points are deducted.
The skill presents coherent paths for publishing, pull delivery, parsing, triggers, and common HTTP error handling. It lacks skill-specific reproducible tests, does not verify its package/API assumptions within the file, mixes Azure Functions programming models, and gives limited abnormal-input and idempotency guidance; therefore the static score remains below the 10-point ceiling.
Triggers and target scenarios are reasonably clear, covering topics, domains, namespaces, CloudEvents, and EventGridEvents. Non-fit boundaries, input/output contracts, and environment prerequisites are not explicit, and there is no evidence of Chinese-language support or mainland-China network reachability; Azure service availability may therefore constrain use, warranting deductions.
The document is well structured with installation, authentication, examples, type references, best practices, error handling, related SDKs, and references. It includes MIT, author, and version metadata, while repository-level license, security, and CI signals add governance context. Skill-level changelog, named maintenance responsibility, update path, FAQ, and known limitations are missing, so points are deducted.
It covers common Event Grid publishing, consumption, parsing, and function-trigger tasks with directly reusable snippets. Static review cannot establish compilation or runtime correctness; infrastructure setup, RBAC, retries, and deployment prerequisites remain for the user to supply, and some examples may require substantial review, so the score is conservatively capped and reduced.
The skill includes NuGet, API, Quickstart, pull-delivery, and GitHub source references, and the repository supplies general testing and evaluation workflows. There is no skill-path-specific committed test evidence, execution output, or corroborating validation, so the conclusion relies mainly on documentation and remains below the static ceiling.
- Publishing, acknowledging, rejecting, and failover create external Azure effects; confirm targets, permissions, duplicate-delivery behavior, and recovery strategy before use.
- Do not place the example access keys or SAS tokens in source code; verify RBAC, credential sourcing, package versions, and API compatibility.
- No mainland-China reachability or Chinese-language guidance is provided; validate service and documentation access separately before deployment.
What it does & when to use it
This skill helps .NET developers build event-driven applications with the Azure Event Grid SDK. It covers push delivery for topics and domains and pull delivery for namespaces. The guidance includes EventGridEvent and CloudEvent schemas, API key, Microsoft Entra, and SAS authentication. It also includes Azure Functions triggers, event parsing, system events, batching, failure handling, and failover examples.
It shows how to install the relevant NuGet packages, configure topic, domain, or namespace endpoints and credentials, and create EventGridPublisherClient, EventGridSenderClient, and EventGridReceiverClient instances. It demonstrates sending individual and batched events, routing events through domain topics, receiving and acknowledging or releasing events, rejecting dead-letter events, parsing JSON payloads, handling system events, and consuming EventGridEvent or CloudEvent values in Azure Functions.
- A .NET developer publishing order, inventory, or other business events to an Azure Event Grid topic or domain.
- A team connecting Azure Event Grid with other platforms through the CloudEvents format.
- A developer using namespace pull delivery to receive events and acknowledge, retry, or reject them based on processing results.
- An Azure Functions developer processing native Event Grid events or CloudEvents with Event Grid triggers.
- A team configuring Entra ID, access-key, or SAS authentication while handling authorization errors, oversized payloads, and regional failover.
Pros & cons
- Covers both push and pull delivery across topics, domains, and namespaces.
- Provides concrete C# examples for both EventGridEvent and CloudEvent.
- Includes multiple authentication methods, Azure Functions consumption, system-event parsing, and error handling.
- Addresses batching, idempotent handlers, dead lettering, and failover patterns.
- The repository README identifies the collection as work in progress, so skills and tests may change.
- The source does not provide a dedicated test result for this individual skill.
- Running the examples requires Azure Event Grid resources, endpoints, and suitable credentials; the skill does not create them.
- The skill provides implementation guidance but does not document a complete project template or deployment workflow.
How to install
Install the collection with npx skills add microsoft/skills, then select the required skill in the wizard. This skill is located at .github/plugins/azure-sdk-dotnet/skills/azure-eventgrid-dotnet/SKILL.md. For a .NET project, install the packages supported by the source: dotnet add package Azure.Messaging.EventGrid; add dotnet add package Azure.Messaging.EventGrid.Namespaces for namespace pull delivery; and add dotnet add package Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents for CloudNative CloudEvents interoperability.
How to use
Invoke this skill when the task mentions “Event Grid,” “EventGridPublisherClient,” “CloudEvent,” “EventGridEvent,” “publish events .NET,” “event-driven,” or “pub/sub.” Then select the appropriate publisher, sender, or receiver client, configure the matching endpoint and credential, and apply the provided C# patterns for sending, receiving, acknowledging, releasing, rejecting, or parsing events.
Compared to similar skills
EventGridEvent is an Azure-specific schema, while CloudEvent follows the CNCF standard and offers stronger cross-platform interoperability. Topics and domains use push delivery through EventGridPublisherClient; namespaces use pull delivery through EventGridSenderClient and EventGridReceiverClient.