Soenneker.Controllers.Alerts 4.0.861

Prefix Reserved
dotnet add package Soenneker.Controllers.Alerts --version 4.0.861
                    
NuGet\Install-Package Soenneker.Controllers.Alerts -Version 4.0.861
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Controllers.Alerts" Version="4.0.861" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Controllers.Alerts" Version="4.0.861" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Controllers.Alerts" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Controllers.Alerts --version 4.0.861
                    
#r "nuget: Soenneker.Controllers.Alerts, 4.0.861"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Controllers.Alerts@4.0.861
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Controllers.Alerts&version=4.0.861
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Controllers.Alerts&version=4.0.861
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Controllers.Alerts

Adds an MVC endpoint that accepts Azure Monitor common alert schema payloads and forwards them to IAlertsCoordinator.

Install

dotnet add package Soenneker.Controllers.Alerts

Register the controller and coordinator

using Soenneker.Controllers.Alerts;
using Soenneker.Coordinators.Alerts.Registrars;

builder.Services
    .AddControllers()
    .AddApplicationPart(typeof(AlertsController).Assembly);

builder.Services.AddAlertsCoordinatorAsSingleton();

The coordinator requires these application settings in addition to the Microsoft Teams settings used by Soenneker.MsTeams.Util:

{
  "Api": {
    "Alerts": {
      "AzureApiKey": "replace-with-a-random-secret"
    }
  },
  "Environment": "Production"
}

Endpoint

POST /alerts/azure?apiKey=<secret>
Content-Type: application/json

The body is a CasRequest from Azure Monitor's common alert schema.

Response Meaning
201 Created The coordinator accepted and forwarded the alert
400 Bad Request The payload did not contain the required alert data

The controller is excluded from API Explorer and marked AllowAnonymous; the configured API key is its application-level credential. Authentication failure is surfaced by the coordinator through the application's exception handling.

Security and operation

  • Azure Monitor's ordinary webhook model commonly places a token in the callback URL. Query strings are frequently captured by gateways, access logs, traces, and deployment state. Use HTTPS, redact the apiKey query value throughout the request path, rotate it when exposed, and never place the callback URL in source control.
  • For stronger authentication, prefer an Azure Monitor Secure Webhook protected by Microsoft Entra ID and an application endpoint configured for bearer authentication. That requires host-level authentication rather than this controller's static-key coordinator contract.
  • Cancellation is forwarded to the coordinator and Microsoft Teams delivery. It does not undo a message already accepted by the downstream service.
  • API version 1 is declared through ASP.NET API Versioning; the host determines whether versions are selected by query string, header, media type, or another configured reader.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.861 189 10/15/2026
4.0.860 134 10/15/2026
4.0.859 96 10/15/2026
4.0.858 82 10/15/2026
4.0.857 87 10/14/2026
4.0.856 84 10/14/2026
4.0.855 84 10/14/2026
4.0.853 86 10/14/2026
4.0.852 86 10/14/2026
4.0.851 100 10/14/2026
4.0.845 105 10/13/2026
4.0.844 91 10/12/2026
4.0.841 92 10/12/2026
4.0.840 114 10/11/2026
4.0.839 104 10/11/2026
4.0.838 110 10/11/2026
4.0.837 95 10/11/2026
4.0.836 114 10/10/2026
4.0.835 105 10/10/2026
4.0.834 134 10/6/2026
Loading failed

Update dependency Soenneker.Coordinators.Alerts to 4.0.1039 (#1427)