Apex.SqlClient.AzureIdentity
0.1.0-preview.3
dotnet add package Apex.SqlClient.AzureIdentity --version 0.1.0-preview.3
NuGet\Install-Package Apex.SqlClient.AzureIdentity -Version 0.1.0-preview.3
<PackageReference Include="Apex.SqlClient.AzureIdentity" Version="0.1.0-preview.3" />
<PackageVersion Include="Apex.SqlClient.AzureIdentity" Version="0.1.0-preview.3" />
<PackageReference Include="Apex.SqlClient.AzureIdentity" />
paket add Apex.SqlClient.AzureIdentity --version 0.1.0-preview.3
#r "nuget: Apex.SqlClient.AzureIdentity, 0.1.0-preview.3"
#:package Apex.SqlClient.AzureIdentity@0.1.0-preview.3
#addin nuget:?package=Apex.SqlClient.AzureIdentity&version=0.1.0-preview.3&prerelease
#tool nuget:?package=Apex.SqlClient.AzureIdentity&version=0.1.0-preview.3&prerelease

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 | Versions 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. |
-
net10.0
- Apex.MsSqlClient (>= 0.1.0-preview.3)
- Apex.MySqlClient (>= 0.1.0-preview.3)
- Apex.PgClient (>= 0.1.0-preview.3)
- Azure.Core (>= 1.61.0)
- Azure.Identity (>= 1.21.0)
- System.IO.Hashing (>= 10.0.11)
-
net11.0
- Apex.MsSqlClient (>= 0.1.0-preview.3)
- Apex.MySqlClient (>= 0.1.0-preview.3)
- Apex.PgClient (>= 0.1.0-preview.3)
- Azure.Core (>= 1.61.0)
- Azure.Identity (>= 1.21.0)
- System.IO.Hashing (>= 10.0.11)
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 |