Anarchy.Toolkit.Infrastructure.Http.Msal 1.0.0

dotnet add package Anarchy.Toolkit.Infrastructure.Http.Msal --version 1.0.0
                    
NuGet\Install-Package Anarchy.Toolkit.Infrastructure.Http.Msal -Version 1.0.0
                    
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="Anarchy.Toolkit.Infrastructure.Http.Msal" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Anarchy.Toolkit.Infrastructure.Http.Msal" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Http.Msal" />
                    
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 Anarchy.Toolkit.Infrastructure.Http.Msal --version 1.0.0
                    
#r "nuget: Anarchy.Toolkit.Infrastructure.Http.Msal, 1.0.0"
                    
#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 Anarchy.Toolkit.Infrastructure.Http.Msal@1.0.0
                    
#: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=Anarchy.Toolkit.Infrastructure.Http.Msal&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Anarchy.Toolkit.Infrastructure.Http.Msal&version=1.0.0
                    
Install as a Cake Tool

Anarchy.Toolkit.Infrastructure.Http.Msal

Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Infrastructure · Package catalog

Opt-in Microsoft Entra ID (MSAL) authentication for HTTP clients built on Anarchy.Toolkit.Infrastructure.Http.

dotnet add package Anarchy.Toolkit.Infrastructure.Http.Msal
  • MsalCertificateAuthenticationHandler acquires an OAuth 2.0 bearer token with certificate-based client credentials and adds it to every request.
  • MsalCertificateHttpClientConfiguration<TClient> adds the handler on top of the common client configuration, driven by IMsalCertificateHttpAdapterSettings<TClient>.

When to use it

Use this package only when an adapter calls an API protected by Microsoft Entra ID with certificate credentials. It keeps Microsoft.Identity.Client out of Infrastructure.Http for everyone else.

How to use it

  1. Implement IMsalCertificateHttpAdapterSettings<TClient> with the client id, authority, scope and PEM certificate and private key.
  2. Register MsalCertificateHttpClientConfiguration<TClient> as you would any HttpClientConfigurationBase<TClient>.
  3. Handle AccessTokenAcquisitionException and CertificatePrivateKeyMissingException at the adapter boundary as needed.

See the toolkit overview and architecture guide.

Releases

See the release notes for the complete release history.

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
1.0.0 47 11/27/2026

## Releases

### 1.0.0

- Extract the MSAL certificate authentication handler, its client configuration, settings and exceptions from `Infrastructure.Http`.