VOOZH about

URL: https://www.nuget.org/packages/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider

⇱ NuGet Gallery | Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.0.0




👁 Image
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.0.0

Prefix Reserved
dotnet add package Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider --version 7.0.0
 
 
NuGet\Install-Package Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider -Version 7.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="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="7.0.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="7.0.0" />
 
Directory.Packages.props
<PackageReference Include="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" />
 
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 Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider --version 7.0.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider, 7.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 Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider@7.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=Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider&version=7.0.0
 
Install as a Cake Addin
#tool nuget:?package=Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider&version=7.0.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider

👁 NuGet
👁 NuGet Downloads

Description

This library provides an Always Encrypted Azure Key Vault Provider for Microsoft.Data.SqlClient. It enables .NET applications to use Microsoft Azure Key Vault with Always Encrypted in Microsoft Azure SQL Database and Microsoft SQL Server.

Always Encrypted allows clients to encrypt sensitive data inside client applications and never reveal the encryption keys to SQL Server. This provider enables storing column master keys (CMKs) in Azure Key Vault, providing centralized key management, secure key storage, and integration with Entra ID authentication.

Supportability

This package supports:

  • .NET Framework 4.6.2+
  • .NET 8.0+

Installation

Install the package via NuGet:

dotnet add package Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider

Or via the Package Manager Console:

Install-Package Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider

Getting Started

Register the Provider

Before you can use Azure Key Vault with Always Encrypted, you must register the provider globally or per-connection:

using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider;
using Azure.Identity;

// Create the AKV provider using Azure.Identity (recommended)
var azureCredential = new DefaultAzureCredential();
var akvProvider = new SqlColumnEncryptionAzureKeyVaultProvider(azureCredential);

// Register globally (once per application)
SqlConnection.RegisterColumnEncryptionKeyStoreProviders(
 new Dictionary<string, SqlColumnEncryptionKeyStoreProvider>
 {
 { SqlColumnEncryptionAzureKeyVaultProvider.ProviderName, akvProvider }
 });

Use with a Connection

Enable Always Encrypted in your connection string:

var connectionString = "Server=myserver;Database=mydb;Column Encryption Setting=Enabled;...";

using var connection = new SqlConnection(connectionString);
await connection.OpenAsync();

// Execute queries against encrypted columns - encryption/decryption is automatic
using var command = new SqlCommand("SELECT SSN FROM Customers WHERE Id = @id", connection);
command.Parameters.AddWithValue("@id", customerId);
var ssn = await command.ExecuteScalarAsync();

Key Features

  • Azure Key Vault Integration: Store and manage column master keys (CMKs) in Azure Key Vault
  • Entra ID Authentication: Supports Azure.Identity credentials for seamless Entra ID authentication
  • Key Caching: Built-in caching of column encryption keys (CEKs) for improved performance
  • Multiple Authentication Methods: Supports DefaultAzureCredential, ClientSecretCredential, ManagedIdentityCredential, and more

Documentation

Release Notes

Release notes are available at: https://go.microsoft.com/fwlink/?linkid=2090501

License

This package is licensed under the MIT License.

Related Packages

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider:

Package Downloads
SealReportLibrary.NETCore

Provides the objects to create, load and execute reports using the Seal Report framework. A full repository file structure must be available on the machine running the program.

TPJ.Encrypt

Simple encrypt library for both one way encryption using SHA256 and two way encryption using AES

TryIT.SqlAdo.MicrosoftSqlClient

SQL DB Connector via Ado.Net, with Column Encryption supported

Mmp.Gateway.Commons

Package Description

PAYPKG.SharedLibs

.Net Core Shared libraries. Includes the Data and Entities packages

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider:

Repository Stars
ariacom/Seal-Report
Database Reporting Tool and Tasks (.Net)
microsoft/sqltoolsservice
SQL Tools API service that provides SQL Server data management capabilities.
Version Downloads Last Updated
7.0.0 115,160 3/17/2026
7.0.0-preview1.26064.3 1,337 3/5/2026
6.1.2 747,776 8/20/2025
6.1.1 12,140 8/15/2025
6.1.0 13,931 7/31/2025
6.0.0 610,025 1/30/2025
5.1.0 2,019,983 2/2/2024
3.0.0 2,648,810 6/14/2021
2.0.0 225,364 3/3/2021
1.2.0 516,944 12/1/2020
1.1.1 692,853 3/3/2020
1.0.0 99,045 11/19/2019
1.0.0-preview1.19295.2 5,699 10/22/2019
1.0.0-preview1.19292.1 721 10/19/2019