SaaSFactory.TenantAuth.AzureAAD 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SaaSFactory.TenantAuth.AzureAAD --version 1.0.0
                    
NuGet\Install-Package SaaSFactory.TenantAuth.AzureAAD -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="SaaSFactory.TenantAuth.AzureAAD" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SaaSFactory.TenantAuth.AzureAAD" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SaaSFactory.TenantAuth.AzureAAD" />
                    
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 SaaSFactory.TenantAuth.AzureAAD --version 1.0.0
                    
#r "nuget: SaaSFactory.TenantAuth.AzureAAD, 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 SaaSFactory.TenantAuth.AzureAAD@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=SaaSFactory.TenantAuth.AzureAAD&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SaaSFactory.TenantAuth.AzureAAD&version=1.0.0
                    
Install as a Cake Tool

SaaSFactory.TenantAuth.AzureAD v2.0

Production-ready, multi-tenant Azure AD authentication for ASP.NET Core (.NET 8) with enhanced features, flexible audience validation, and configurable authentication policies.

๐Ÿš€ What's New in v2.0

  • โœ… Enhanced Azure AD Integration with flexible audience validation
  • โœ… Configurable Authentication Policies (optional global authentication)
  • โœ… Improved Debugging with detailed error logging
  • โœ… Legacy Format Support for better Azure AD compatibility
  • โœ… Production Tested with real Azure AD environments
  • โœ… Backward Compatible - all v1.x functionality preserved

Quick Start

`csharp using SaaSFactory.TenantAuth.AzureAD;

var builder = WebApplication.CreateBuilder(args);

// Enhanced authentication with advanced features builder.Services.AddEnhancedSaaSFactoryAzureADAuth( builder.Configuration, enableStrictTenantValidation: true, enableGlobalAuthPolicy: false, supportLegacyAudienceFormats: true );

builder.Services.AddControllers(); var app = builder.Build();

app.UseAuthentication(); app.UseAuthorization(); app.UseTenantValidation(); app.MapControllers(); app.Run(); `

Configuration

json { "AzureAd": { "Instance": "https://login.microsoftonline.com/", "Domain": "yourdomain.onmicrosoft.com", "TenantId": "your-tenant-id", "ClientId": "your-client-id", "Audience": "api://your-client-id" } }

Features

  • ๐Ÿ”’ Multi-tenant security with automatic tenant isolation
  • ๐Ÿข Enterprise-grade Azure AD integration
  • โšก High performance with memory caching
  • ๐Ÿ“Š Comprehensive logging and diagnostics
  • ๐Ÿ”ง Flexible audience validation (supports both 'appId' and 'api://appId')
  • โš™๏ธ Configurable authentication policies
  • ๐Ÿงช Well tested with unit and integration tests

Requirements

  • .NET 8.0 or later
  • Azure AD tenant with registered application

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
2.0.0 217 8/14/2025
1.0.0 209 8/14/2025

v1.0.0 - Initial Release
โ€ข Enhanced Azure AD authentication with flexible audience validation
โ€ข Configurable authentication policies (enableGlobalAuthPolicy, supportLegacyAudienceFormats)
โ€ข Improved error logging and diagnostics
โ€ข Multi-tenant support with proper token validation
โ€ข Backward compatibility with existing authentication flows
โ€ข Production-ready with comprehensive testing