Apex.SqlClient.AzureIdentity 0.1.0-preview.3

This is a prerelease version of Apex.SqlClient.AzureIdentity.
dotnet add package Apex.SqlClient.AzureIdentity --version 0.1.0-preview.3
                    
NuGet\Install-Package Apex.SqlClient.AzureIdentity -Version 0.1.0-preview.3
                    
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="Apex.SqlClient.AzureIdentity" Version="0.1.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Apex.SqlClient.AzureIdentity" Version="0.1.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="Apex.SqlClient.AzureIdentity" />
                    
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 Apex.SqlClient.AzureIdentity --version 0.1.0-preview.3
                    
#r "nuget: Apex.SqlClient.AzureIdentity, 0.1.0-preview.3"
                    
#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 Apex.SqlClient.AzureIdentity@0.1.0-preview.3
                    
#: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=Apex.SqlClient.AzureIdentity&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Apex.SqlClient.AzureIdentity&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Tool

Apex.SqlClient.AzureIdentity

Apex SQL Client Azure Identity

Apex.SqlClient.AzureIdentity adds Microsoft Entra authentication to all Apex database drivers without adding Azure SDK dependencies to the base driver packages.

Pass a reusable TokenCredential; Apex requests a fresh cached token whenever a pool opens a new physical connection.

using Apex.SqlClient.AzureIdentity;
using Apex.PgClient;
using Azure.Identity;

TokenCredential credential = new DefaultAzureCredential();
PgConnectOptions options = new PgConnectOptions
{
    Host = "example.postgres.database.azure.com",
    Database = "app",
}.UseAzureIdentity(
    credential,
    new AzureIdentityOptions { Username = "app-identity" });

await using PgPool pool = PgPool.Create(options);

The same UseAzureIdentity method is available for MySqlConnectOptions and MsSqlConnectOptions. PostgreSQL and MySQL use the standard Azure OSS database scope; SQL Server uses the Azure SQL scope and native TDS federated authentication.

When Username is omitted for PostgreSQL or MySQL, Apex infers it once from the database or Azure management token. Specify it explicitly if the principal's database role differs from its token claims.

Use DatabaseScope and ManagementScope overrides for sovereign clouds. Azure identity enables certificate-verifying TLS and does not support static access tokens in connection strings.

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.  net11.0 is compatible. 
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
0.1.0-preview.3 69 8/17/2026
0.1.0-preview.2 75 8/16/2026