Repository navigation
Releases
Preview Release v8.0.0-preview1
This first 8.0 preview includes changes since the release/7.1 branch point, 92f220956b07328054701a869f452cade51830c1 (2026-09-15), through b87ca6e7643611ddc3273324de346d09e8ff2c43. Changes already shipped in 7.1.1 are identified below because the branch-cut baseline predates that release.
The driver and its four companion packages use package version 8.0.0-preview1. The family AssemblyVersion changes from 7.0.0.0 to 8.0.0.0; .NET Framework applications should review strong-name binding redirects when upgrading. Native SNI and Microsoft.SqlServer.Server remain independently versioned.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 8.0.0-preview1
- Microsoft.Data.SqlClient.Extensions.Azure 8.0.0-preview1
- Microsoft.Data.SqlClient.Extensions.Abstractions 8.0.0-preview1
- Microsoft.Data.SqlClient.Internal.Logging 8.0.0-preview1
Added
Vector float16 support and per-connection version negotiation
What Changed:
- Added support for SQL Server
vector(N, float16), including reader values, parameters, output parameters, column schema, and bulk copy. On modern .NET, useSqlVector<Half>; the existingSqlVector<float>API remains supported. (#4501) - Added the
Vector Type Supportconnection-string keyword andSqlConnectionStringBuilder.VectorTypeSupport, of typeSqlVectorTypeSupport. Values areOff,V1, andV2; the default isV2.
Who Benefits:
- Applications storing embeddings can use float16 vectors with smaller element payloads, while choosing the result-type contract independently for each connection.
Impact:
- Result-type change: when the server negotiates V2, modern .NET returns native
SqlVector<Half>values for float16 columns instead of JSON strings. SetVector Type Support=v1to preserve float16 JSON-string results, oroffto receive all vector columns as text. Different settings use separate connection pools. - .NET Framework has no
System.Half. Float16 columns remain available as JSON strings or throughGetSqlVector<float>, which widens their elements exactly. Prefer the latter when reading many values, to avoid the additional JSON serialization. GetColumnSchema()exposesVectorBaseTypeandVectorDimensionsthrough the column indexer when native vector metadata is negotiated.- SQL Server performs cross-base conversion for native vector parameters and bulk-copy inputs. Typed vectors are not automatically serialized for text destinations; supply JSON strings or an explicit SQL cast instead. Vector TVPs are not added by this change.
- Float16 requires a server that supports it; enable
PREVIEW_FEATURESwhile the server feature is in preview. See the float16 sample.
var builder = new SqlConnectionStringBuilder(connectionString)
{
VectorTypeSupport = SqlVectorTypeSupport.V1
};Opt-in reset of pooled transaction isolation levels
What Changed:
- Added
Switch.Microsoft.Data.SqlClient.EnableTransactionIsolationLevelReset, defaultfalse. When enabled, a SqlClient-tracked isolation-level change is reset toREAD COMMITTEDbefore pooled reuse when no existing enlistment or active delegated transaction root remains. (#96, #4330)
Who Benefits:
- Applications that otherwise inherit an isolation level left by a previous user of a pooled connection.
Impact:
- Enable the switch before opening connections. A necessary reset adds a round trip and uses the remaining open-timeout budget. Known Azure Synapse dedicated SQL pool endpoints are excluded; the default preserves existing behavior.
- A user-issued
SET TRANSACTION ISOLATION LEVELalone does not mark the connection for this reset. The switch is not general cleanup for arbitrary T-SQL session changes.
Additional TimeOnly write paths (net10.0 only)
What Changed:
- Added
TimeOnlysupport forSqlBulkCopyDataRow/DataTable sources andSqlParametervalues withSqlDbType.Variant, writing SQLtimevalues. (#4604)
Who Benefits:
- Applications using modern .NET time-only values in bulk-copy and variant workflows.
Impact:
- These paths no longer require conversion to
TimeSpan. This does not addTimeOnlyto .NET Framework.
Authentication diagnostics
What Changed:
- The Azure extension forwards MSAL, allowlisted Azure.Identity, and SqlClient token acquisition events to
Microsoft.Data.SqlClient.EventSourceusing the newAuthenticationTracekeyword (0x2000). (#1846, #4872)
Who Benefits:
- Support teams can diagnose built-in Entra ID authentication without implementing a custom provider or logging callback.
Impact:
-
Collect authentication events with
0x2000, or authentication plus ordinary trace with0x2002. On modern .NET:dotnet-trace collect --process-id <pid> --providers Microsoft.Data.SqlClient.EventSource:0x2000:5 --rundown false -
On .NET Framework, use ETW or an in-process
EventListener. PII logging remains disabled for extension-owned requests. Correlation is best effort; some Azure.Identity events have an empty connection ID and can originate from application-owned credentials. Treat captures as sensitive operational data. -
See the Azure extension notes for limitations and the logging sample.
Changed
Breaking change: minimum modern runtime is .NET 10
What Changed:
- Replaced the
net8.0andnet9.0driver implementation targets withnet10.0. .NET Framework 4.6.2 support is retained. (#4779)
Who Benefits:
- Applications moving to the .NET 10 runtime and dependency servicing band.
Impact:
- Upgrade modern applications to .NET 10, or remain on a compatible earlier driver. Retained
netstandard2.0reference/unsupported-platform assets do not extend driver runtime support to .NET 8 or .NET 9.
Breaking change: TCP MultiSubnetFailover is enabled by default
What Changed:
- When omitted from the connection string,
MultiSubnetFailovernow defaults totruefor TCP connections.TransparentNetworkIPResolutiondefaults tofalseon .NET Framework. (#4876, #4927)
Who Benefits:
- Applications connecting to multi-address hosts try resolved IP addresses in parallel, without needing an explicit opt-in.
Impact:
- Explicit values remain authoritative. The automatic default is disabled for non-TCP protocols, LocalDB, database mirroring partners,
admin:/via:, and unprefixed local servers using native SNI. Explicittruestill fails with unsupported protocols or failover partners. MSF retains its 64-address limit. - With native SNI on Windows, an unprefixed remote host now uses TCP only, without Named Pipes fallback. Use
np:orMultiSubnetFailover=falsewhen needed. - With MSF enabled,
IPAddressPreferenceand TNIR are ignored. The builder reports the keyword default, not the routing decision for a particular connection. - Restore the old MSF default with
Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault=false. On .NET Framework, also setSwitch.Microsoft.Data.SqlClient.DisableTNIRByDefaultInConnectionString=falseto restore the previous TNIR default. Set switches before using SqlClient. See networking migration guidance.
Breaking change: Azure Attestation requires the Azure extension
What Changed:
- Moved Azure Attestation token validation and the IdentityModel dependencies from the core driver to
Microsoft.Data.SqlClient.Extensions.Azure. (#4017, #4790)
Who Benefits:
- Applications not using Azure Attestation no longer receive these dependencies from core.
Impact:
- Applications using
Attestation Protocol=AASmust explicitly reference the matching Azure extension. Without it, enclave session setup throwsInvalidOperationException. - The Azure extension now depends on Azure.Core rather than Azure.Identity. Credential namespaces are unchanged. Remove direct Azure.Identity references older than 1.21.0, or upgrade to 1.21.0 or later; Azure.Identity.Broker users need 1.6.0 or later. (#4749)
Breaking changes: reference API and argument validation corrections
What Changed:
- Reference APIs now match implementation accessibility and sealing, and no longer expose the nonexistent
SqlBatchCommand.CanCreateParametersetter on .NET Framework. ([#4832](https://github.c...
Stable Release v6.1.8
This update brings the following changes since the 6.1.7 release:
Changed
-
Updated the
System.Security.Cryptography.Pkcsdependency to 8.0.2 (was 8.0.1) for .NET Framework 4.6.2, .NET 8.0, and .NET Standard 2.0, and updated theMicrosoft.Extensions.Caching.Memory,System.Configuration.ConfigurationManager, andSystem.Security.Cryptography.Pkcsdependencies to 9.0.21 (was 9.0.11) for .NET 9.0.
(#4842, #4862, #4870) -
Improved the error reported when
Active Directory Interactiveauthentication through the Windows Web Account Manager (WAM) broker fails because the host has no parent window, such as a service or Azure Functions host. The resulting error now explains the supported alternatives: supply a parent window withSetParentActivityOrWindowFunc, useActive Directory Defaultwith a configured non-interactive credential, or supply a customApplicationClientIdwithUseWamBrokerdisabled. The original MSAL error code and inner exception are preserved, and authentication selection, retry behavior, and other failures are unchanged. (Windows only)
(#4854, #4858, #4918)
Fixed
-
Fixed the managed SNI path ignoring
HostNameInCertificateduring server certificate validation. WhenHostNameInCertificateis set, it is now the only host name the server certificate is validated against, and certificates that do not match it are rejected. Default host-name selection when the property is not set, certificate chain validation,ServerCertificatematching, and the connection destination are unchanged. (net8.0/net9.0 only)
(#4905, #4909) -
Fixed Always Encrypted enclave session caching so that cached enclave sessions are isolated by attestation protocol. A session established with one
Attestation Protocolsetting is no longer reused by a connection to the same server, database, and attestation URL that uses a different protocol.
(#4829, #4868) -
Fixed
SqlDataReader.HasRowsreturningfalsewhen a result set contains rows but the server sends multiple informational messages, or an informational message before anORDERtoken, ahead of the first row. Empty results still reportfalse, andInfoMessagedelivery is unchanged.
(#3018, #4773, #4898) -
Fixed an intermittent
InvalidOperationException("Nullable object must have a value") from statistics bookkeeping when commands complete concurrently on a MARS connection. This issue was reported as a regression starting with 6.1.4.
(#4778, #4875, #4896) -
Fixed Entra ID authentication when the server supplies an authority URL with an OAuth endpoint suffix, such as
https://login.microsoftonline.com/<tenant>/oauth2/authorizereturned by the Dataverse/Dynamics 365 TDS endpoint. The provider now extracts the tenant from the first path segment and uses the normalized authority for Azure.Identity credentials, MSAL, and their cache keys. An authority URL that cannot be parsed now fails with a clear, localizedArgumentExceptionnaming the authority. Bare tenant authority URLs used by Azure SQL and Fabric retain their existing behavior.
(#4496, #4521, #4791, #4807)
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
Full details: release-notes/6.1/6.1.8.md
Stable Release v7.1.1
This servicing release fixes decimal parameter validation, token expiry handling in connection pool V2, and connection opens that are in progress when a pool is cleared.
Package version alignment: The SqlClient family packages share the
7.1.1version:
Microsoft.Data.SqlClientMicrosoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProviderMicrosoft.Data.SqlClient.Extensions.AzureMicrosoft.Data.SqlClient.Extensions.AbstractionsMicrosoft.Data.SqlClient.Internal.Logging
Microsoft.SqlServer.Serveris versioned independently and is not part of this release. Applications should use matching7.1.1versions of the driver and its companion packages. The aligned assemblies retainAssemblyVersion 7.0.0.0; upgrading from7.1.0does not require new .NET Framework strong-name binding redirects.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.1
- Microsoft.Data.SqlClient.Extensions.Azure 7.1.1
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
Changes Since 7.1.0
Fixed
-
Fixed an
ArgumentExceptionwhen sending zero-valueddecimalorSqlDecimalparameters whose precision equals their scale. Nonzero precision validation and support for large decimal values are unchanged. (#4715, #4721, #4732) -
Fixed connection pool V2 handing out pooled connections with expired or nearly expired access tokens. The pool now checks token expiry before reuse, matching the default pool's behavior while preserving transaction-affine reuse. This affects only applications that opt in to connection pool V2. (#4734, #4739)
-
Fixed connection opens failing when
ClearPoolorClearAllPoolsraces with an in-flight open. Requests already admitted to the cleared pool can finish, and connections returned to the retired pool are discarded rather than reused. (#4714, #4718, #4740)
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM, Windows ARM64, Linux, macOS)
Dependencies
.NET 9.0
- Microsoft.Bcl.Cryptography 9.0.18
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI.runtime 7.1.0
- Microsoft.Extensions.Caching.Memory 9.0.18
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 9.0.18
- System.Security.Cryptography.Pkcs 9.0.18
- System.Threading.RateLimiting 9.0.18
.NET 8.0
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI.runtime 7.1.0
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Threading.RateLimiting 8.0.0
.NET Standard 2.0
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Bcl.TimeProvider 8.0.1
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI.runtime 7.1.0
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 10.0.3
- System.Threading.Channels 10.0.3
- System.Threading.RateLimiting 8.0.0
.NET Framework 4.6.2+
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Bcl.TimeProvider 8.0.1
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI 7.1.0
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- System.Buffers 4.6.1
- System.Data.Common 4.3.0
- System.Diagnostics.DiagnosticSource 10.0.3
- System.Memory 4.6.3
- System.Runtime.InteropServices.RuntimeInformation 4.3.0
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 10.0.3
- System.Threading.Channels 10.0.3
- System.Threading.RateLimiting 8.0.0
- System.ValueTuple 4.6.2
Stable Release v7.1.0
This is the general availability release of Microsoft.Data.SqlClient 7.1. It closes out the 7.1 preview cycle with application identity reporting for telemetry, the deprecation of TransparentNetworkIPResolution, and a set of connection, transaction, and Named Pipes fixes.
Important — package version alignment: Starting with the 7.0.2 release, the
Microsoft.Data.SqlClientdriver and its companion packages share a single aligned version. The7.1.0GA release continues this alignment; the following packages ship together as7.1.0:
Microsoft.Data.SqlClientMicrosoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProviderMicrosoft.Data.SqlClient.Extensions.AzureMicrosoft.Data.SqlClient.Extensions.AbstractionsMicrosoft.Data.SqlClient.Internal.Logging(
Microsoft.SqlServer.Servercontinues to version independently and remains at1.0.0.)Applications must reference the same versions of
Microsoft.Data.SqlClientand its extensions for best compatibility. In particular, applications that referenceMicrosoft.Data.SqlClient.Extensions.Azuremust upgrade it to7.1.0when upgradingMicrosoft.Data.SqlClientto7.1.0.Compatibility guarantee: All aligned assemblies ship with
FileVersion 7.1.0.xandAssemblyVersion 7.0.0.0. TheAssemblyVersionis unchanged from 7.0.2, so upgrading from7.0.2,7.0.3, or any7.1preview to7.1.0does not require any new .NET Framework strong-name binding redirects. Applications upgrading from7.0.0or7.0.1should note thatExtensions.Azure,Extensions.Abstractions, andInternal.Loggingraised theirAssemblyVersionfrom1.0.0.0to7.0.0.0in 7.0.2; see those release notes for the one-time .NET Framework impact.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.0
- Microsoft.Data.SqlClient.Extensions.Azure 7.1.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.0
- Microsoft.Data.SqlClient.Internal.Logging 7.1.0
Changes Since 7.1.0-preview3
Added
Application Identity in the USERAGENT Payload
What Changed:
- Added a
RegisteredApplicationenum and a matchingSqlConnection.RegisteredApplicationproperty that let a library or tool identify itself to SQL Server through version 2 of the TDS USERAGENT feature extension. The payload also carries a new driver-owned 64-bit Driver Properties flag field; bit 0 reports whether connection pool V2 is enabled for the process. Both fields are emitted as unpadded uppercase hexadecimal. (#3201, #4632)
Who Benefits:
- Middleware and tooling built on top of the driver — Entity Framework Core, Semantic Kernel, SQL Server Management Studio, SqlPackage, Data API Builder, and similar — can be distinguished in server-side telemetry without the driver accepting arbitrary user-supplied user-agent text. This originated as a request from the Entity Framework Core team.
- Service operators gain a more accurate picture of which client stacks are connecting, which helps when diagnosing workload-specific behavior.
Impact:
- Purely additive from the application's perspective: a newly created physical connection whose
RegisteredApplicationis unset reportsUnknown(0). On the wire the field itself is new — USERAGENT payload v1 carried no application identifier, while v2 always emits one. - Set the property before calling
OpenorOpenAsync. Assigning it while the connection is connecting or open throwsInvalidOperationException.
using var connection = new SqlConnection(connectionString);
connection.RegisteredApplication = RegisteredApplication.EntityFrameworkCore;
await connection.OpenAsync();- The enum is
ushort-backed and marked[CLSCompliant(false)]. Values are partitioned by range:0x0001–0x7FFFfor Microsoft-defined large-scale applications,0x8000–0xBFFFfor small-scale use, and0xC000–0xFFFFfor public/developer use. Applications that are not yet registered can cast an unassigned value from the appropriate range. - Application identity is client-supplied telemetry and must never be used for authorization or any other security decision.
- The value is not part of the connection pool key. A pooled physical connection reports the application that originally created it, and background
Min Pool Sizeconnections reportUnknown. Cloned connections preserve the value.
Changed
TransparentNetworkIPResolution Is Now Obsolete
What Changed:
SqlConnectionStringBuilder.TransparentNetworkIPResolutionis now marked[Obsolete]. The obsoletion message directs callers toMultiSubnetFailoverand notes that Transparent Network IP Resolution (TNIR) is a .NET Framework-only feature. (#4494, #4576)
Who Benefits:
- Applications still relying on TNIR get a compile-time signal to move to
MultiSubnetFailover, which addresses the same "connect quickly across multiple DNS-resolved addresses" goal, works consistently on every supported target framework, and is the documented strategy for Always On availability group listeners.
Impact:
- No runtime behavior change. TNIR still defaults to
trueon .NET Framework, andMultiSubnetFailoverstill defaults tofalse. The property remains .NET Framework-only and is not exposed on modern .NET, where a connection string containing theTransparent Network IP Resolutionkeyword still throwsNotSupportedException. No new AppContext switches were introduced. - The only visible effect is a new
CS0618build warning for code that references the property. Suppress it, or migrate toMultiSubnetFailover, at your own pace. Flipping the TNIR andMultiSubnetFailoverdefaults is deferred to a future major version.
Other changes
- Updated
Microsoft.Data.SqlClient.SNIandMicrosoft.Data.SqlClient.SNI.runtimeto v7.1.0 (was v7.1.0-preview3.26226.3). (#4698) - Unified the exception message raised when conflicting token-based and SSPI authentication properties are set on the same
SqlConnection, and documented the complete set of properties that conflict withAccessToken. (#4629) - Documentation corrections:
- Rewrote the
SqlDataRecordandSqlMetaDatadocumentation, which incorrectly described the SQL CLR-onlySqlContextandSqlPipetypes, and clarified whetherSqlDataRecordinstances can be reused. (#1805, #4440) - Corrected the LCID 1033 sample comment to use the official Windows locale name
English (United States). (#4646)
- Rewrote the
Fixed
- Fixed a pooled connection being returned to the pool in a broken state after a
TransactionScoperollback — for example, when distributed transaction promotion fails on .NET 8+ where implicit distributed transactions are disabled by default. A subsequentOpen()succeeded butBeginTransaction()threwInvalidOperationException("the connection has been broken"). Connection reset now preserves the transaction when the pooled connection is either a delegated transaction root or enlisted in a transaction, instead of only the latter. (#4001, #4557) - Fixed
GetSchema("DataTypes")never reporting the SQL Server 2025jsontype against Azure SQL. The row was filtered by a string comparison against a minimum server version of17.00.000.0, which Azure SQL can never satisfy because it always reports12.00.xxxx. The decision now uses thejsonsupport flag negotiated through the TDSFEATUREEXTACKtoken, which is accurate on both Azure SQL and on-premises SQL Server 2025+. (#4592, #4682) - Fixed a malformed UNC pipe path being composed for IPv6 literal server names over Named Pipes in managed SNI (for example
Server=np:::1,Server=np:[::1], orServer=\\::1\pipe\sql\query). A UNC path component may not contain a colon, and handing such a path to the OS could trigger an access violation inside LSASS on Windows, forcing a reboot. IPv6 literals are now transcribed to their.ipv6-literal.netform as defined by MS-DTYP 2.2.57, and a colon-bearing host with no valid IPv6 interpretation now fails with the standard invalid-connection-string error. Colon-free host names, LocalDB,localhost,., and IPv6 over TCP are unaffected. (net8.0/net9.0 only — this is the managed SNI counterpart to the native SNI fix) (#4523, #4558) - Fixed configurable retry logic installing a permanent, process-wide assem...
Stable Release v7.0.3
This update brings the following changes since the 7.0.2 release:
The core driver and its companion packages ship together as version 7.0.3. Update the companion packages you use alongside the driver to 7.0.3. Assembly versions remain 7.0.0.0, unchanged from 7.0.2.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.0.3
- Microsoft.Data.SqlClient.Extensions.Azure 7.0.3 — includes the Entra ID authority parsing fix for Dataverse/Dynamics 365 connections.
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.3
- Microsoft.Data.SqlClient.Internal.Logging 7.0.3
Changed
- Updated the
Microsoft.Data.SqlClient.SNIandMicrosoft.Data.SqlClient.SNI.runtimedependencies to 6.0.3 (was 6.0.2).
(#4599)
Fixed
-
Fixed a
SqlBulkCopyregression in environments where the application login cannot readsys.all_columns. Bulk copy now falls back to the earlier column-discovery behavior when that permission is unavailable. Support for hidden columns and SQL Graph column aliases still requires access to the metadata view.
(#4370, #4306, #4402) -
Fixed a memory-allocation regression in connection and command operations caused by formatting diagnostic strings even when tracing was disabled. Also corrected trace messages that reported an incorrect object ID or could throw
FormatExceptionwhen traced values contained braces.
(#4528, #4533) -
Fixed
ServerCertificatevalidation on the managed SNI path so the configured certificate is compared against the server certificate even when the server certificate passes chain and host-name validation. When certificate validation is enabled, a missing, unreadable, or invalid certificate file, a certificate mismatch, or a missing server certificate now causes the TLS handshake to fail instead of bypassing the configured certificate check. (net8.0/net9.0 only)
(#4445, #4583) -
Fixed Always Encrypted VSM/HGS enclave attestation to verify that the enclave public key used to establish a session matches the key committed to by the signed attestation report. Missing, malformed, or mismatched key-binding data now causes attestation to fail before the session secret is derived.
(#4532, #4553) -
Fixed
SqlConnection.AccessTokenCallbacknot disabling Transparent Network IP Resolution by default, making it consistent withSqlConnection.AccessToken. An explicitly configuredTransparentNetworkIPResolutionconnection-string value still takes precedence. (net462 only)
(#4520, #4561) -
Fixed authentication state handling so clearing
SqlConnection.AccessToken,AccessTokenCallback, orSspiContextProviderpreserves the other authentication values in the connection pool key. Cloning a connection or updating its credential also preserves itsSspiContextProvider. Combining a non-nullSspiContextProviderwithAccessTokenorAccessTokenCallbacknow throwsInvalidOperationExceptioninstead of silently discarding authentication state; applications must use one authentication mechanism at a time.
(#4520, #4561, #4644) -
Fixed configurable retry logic installing a permanent, process-wide assembly-resolution handler that could interfere with unrelated assembly loading. The handler is now active only while an explicitly configured custom retry provider is resolved and constructed, and probes
AppContext.BaseDirectoryinstead of the current working directory. Place custom retry assemblies in the application base directory; dependencies loaded after provider construction must be resolvable through normal application dependency resolution or an application-provided handler. (net8.0/net9.0 only)
(#2214, #4547, #4663)
Contributors
We thank the following public contributors. Their efforts toward this project are very much appreciated.
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM, Windows ARM64, Linux, macOS)
Full details: release-notes/7.0/7.0.3.md
Stable Release v6.1.7
This update brings the following changes since the 6.1.6 release:
Changed
- Updated the
Microsoft.Data.SqlClient.SNIandMicrosoft.Data.SqlClient.SNI.runtimedependencies to 6.0.3 (was 6.0.2).
(#4598)
Fixed
-
Fixed
ServerCertificatevalidation on the managed SNI path so the configured certificate is compared against the server certificate even when the server certificate passes chain and host-name validation. When certificate validation is enabled, a missing, unreadable, or invalid certificate file, a certificate mismatch, or a missing server certificate now causes the TLS handshake to fail instead of bypassing the configured certificate check. (net8.0/net9.0 only)
(#4445, #4584) -
Fixed Always Encrypted VSM/HGS enclave attestation to verify that the enclave public key used to establish a session matches the key committed to by the signed attestation report. Missing, malformed, or mismatched key-binding data now causes attestation to fail before the session secret is derived.
(#4532, #4552) -
Fixed
SqlConnection.AccessTokenCallbacknot disabling Transparent Network IP Resolution by default, making it consistent withSqlConnection.AccessToken. An explicitly configuredTransparentNetworkIPResolutionconnection-string value still takes precedence. (net462 only)
(#4520, #4560) -
Fixed token authentication state handling so clearing
SqlConnection.AccessTokenpreserves an existingAccessTokenCallbackin the connection pool key, and clearingAccessTokenCallbackpreserves an existingAccessToken. Callback-based authentication now also follows the same prelogin server-certificate validation rules as an explicitly supplied access token.
(#4520, #4560) -
Fixed configurable retry logic installing a permanent, process-wide assembly-resolution handler that could interfere with unrelated assembly loading. The handler is now active only while an explicitly configured custom retry provider is resolved and constructed, and probes
AppContext.BaseDirectoryinstead of the current working directory. Place custom retry assemblies in the application base directory; dependencies loaded after provider construction must be resolvable through normal application dependency resolution or an application-provided handler. (net8.0/net9.0 only)
(#2214, #4547, #4664)
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
Full details: release-notes/6.1/6.1.7.md
Preview Release v7.1.0-preview3
This update brings the following changes since the 7.1.0-preview2 release.
Package version alignment: The
Microsoft.Data.SqlClientdriver and its companion packages continue the aligned versioning introduced in 7.0.2. All five packages listed below ship together as7.1.0-preview3. (Microsoft.SqlServer.Servercontinues to version independently and remains at1.0.0.) Applications that referenceMicrosoft.Data.SqlClient.Extensions.Azuremust upgrade it to7.1.0-preview3when upgradingMicrosoft.Data.SqlClient.
Compatibility guarantee: All aligned assemblies ship with
FileVersion 7.1.0.xandAssemblyVersion 7.0.0.0— unchanged from 7.0.2 — so upgrading from7.0.2to7.1.0-preview3does not require any new .NET Framework strong-name binding redirects.
Packages in this release
Microsoft.Data.SqlClient 7.1.0-preview3
Added
- Asynchronous key store provider APIs for Always Encrypted — four
virtualmethods onSqlColumnEncryptionKeyStoreProviderwithCancellationTokensupport. Purely additive; defaults delegate to the synchronous methods, so existing providers are unaffected (#3672, #3673) - Connection Pool V2 nears parity with the default pool (opt-in via
Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2):- Transaction support (#4487)
- Broken-connection replacement during command execution (#4429)
- Background warmup to
Min Pool Sizeand automatic replenishment (#4452) - Idle pruning driven by
Connection Idle Timeout(#4463) - Optional
ConcurrencyLimiterrate limiting for new physical connections (#4395, #4396) - Leaked connection reclamation, including the previously always-zero
number-of-reclaimed-connectionscounter (#4529) - Metrics and tracing parity with the default pool (#4504)
Changed
- Single cross-platform build — Windows-only native SNI types now trim cleanly on Linux and macOS. Package structure and contents unchanged (#4207, #4239, #4465, #4474)
- Async read-path allocations restored to baseline via
PacketDatanode reuse —ExecuteReaderAsyncgoes from +120.9% to +0.1% against 6.1.6 (#4536) SqlBulkCopyskips graph alias mapping when no graph pseudo-columns are present, recovering a regression from #3677 (#4535)- No formatted trace string is allocated when
SqlClientEventSourcetracing is disabled, recovering a memory regression against 6.1.6. Trace output unchanged (#4528) net9.0dependencies moved to9.0.18;System.Threading.RateLimitingadded to packaged metadata. Other targets keep their8.0.xpins (#4507)Microsoft.Data.SqlClient.SNIand.SNI.runtimeupdated to7.1.0-preview3.26226.3(#4564)
Fixed
- Always Encrypted VSM/HGS attestation now verifies the enclave public key is bound to the signed report, using a fixed-time
SHA-256comparison againstEnclaveData(#4532) SqlConnectionFactoryno longer wakes the process every 30 seconds when no pools exist — including withPooling=Falseand afterClearAllPools()(#1881, #4479)- Connection pool performance counters affecting the default pool as well as pool V2 —
active-soft-connectsandnumber-of-active-connectionscould go negative after a failed activation, and several gauges drifted upward permanently after a broken connection was replaced (#4504) OverflowExceptionwhen sending largedecimalvalues with explicitPrecisionandScale, which primarily affected Always Encrypted (#1655, #4443)- TDS stream error when passing a
DateOnlyvalue withSqlDbType.Variant(net8.0/net9.0) (#3953, #4294) DateOnlyin table-valued parametersql_variantcolumns sent asdatetimeinstead ofdate, which overflowed for values valid asdate(net8.0/net9.0) (#3934, #4439)ServerCertificatekeyword ignored when the platform reported no TLS policy errors. It is now always compared, and an unloadable certificate fails closed withSSLCertificateAuthenticationExceptioninstead of silently falling back to host-name validation (#4445)SqlConnection.AccessTokenCallbacknot disabling TNIR by default, plus pool-key construction andSspiContextProviderexclusivity with token auth (net462 for the TNIR behavior) (#4520)- Fatal exceptions such as
OutOfMemoryExceptioncaptured into faultedTasks across severalSqlBulkCopy,SqlDataReader, andSqlCommandasync entry points (#4437) - Entra ID authentication failing against multi-segment authorities such as the Dataverse / Dynamics 365 TDS endpoint. Ships in
Microsoft.Data.SqlClient.Extensions.Azure(#4496, #4521)
Full details: release-notes/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.0-preview3
Added
SqlColumnEncryptionAzureKeyVaultProvideroverrides the four asynchronous key store provider methods introduced in #3673, calling the Azure SDK's own async APIs and flowing the suppliedCancellationToken(#4540)- Concurrent cache misses for the same key collapse into a single Key Vault request. The gate is only awaited, so no thread blocks, and misses for different keys still proceed in parallel (#4540)
Fixed
- The 2000-entry column master key signature cache could stop compacting and grow unbounded —
LocalCache.GetOrCreatecompacted only onCount == maxSize, an equality test that concurrency could step past. It now compacts onCount >= maxSize(#4540) - Concurrent callers no longer create duplicate
CryptographyClientinstances for the same key (#4540)
Behavior change:
VerifyColumnMasterKeyMetadataandVerifyColumnMasterKeyMetadataAsyncnow reject a null or emptysignaturewithArgumentNullException/ArgumentExceptioninstead of passing it through to the Azure SDK. In-product callers are unaffected.
Runtime requirement: this version requires
Microsoft.Data.SqlClient7.1.0-preview3 or later at runtime, because the overridden methods only exist on the 7.1 base class. The NuGet dependency floor covers restore, but downgrading the driver below 7.1 at runtime produces aTypeLoadException.
Full details: release-notes/add-ons/AzureKeyVaultProvider/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.Extensions.Azure 7.1.0-preview3
Fixed
- Entra ID tenant parsing for multi-segment authorities — the tenant is now taken from the first path segment rather than the last, so an OAuth v1 style authority such as
.../{tenantId}/oauth2/authorizeno longer yields the literal tenant id"authorize". Unparseable authorities raise a clearAuthenticationException, and provider errors are no longer re-wrapped as "Unexpected error". Bare authorities from Azure SQL, Fabric, and Synapse are unaffected (#4496, #4521)
Full details: release-notes/Extensions/Azure/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.0-preview3
- No functional or API changes; aligned version bump only.
Full details: release-notes/Extensions/Abstractions/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview3
- Internal-use-only package. No functional or API changes; aligned version bump only.
Full details: [release-notes/Internal/Logging/7.1/7.1.0-preview3.md](https://github.com/dotnet/SqlClient/blob/main/release-notes/I...
Preview Release v7.1.0-preview2
This update brings the following changes since the 7.1.0-preview1 release.
Package version alignment: The
Microsoft.Data.SqlClientdriver and its companion packages continue the aligned versioning introduced in 7.0.2. All five packages listed below ship together as7.1.0-preview2. (Microsoft.SqlServer.Servercontinues to version independently and remains at1.0.0.) Applications that referenceMicrosoft.Data.SqlClient.Extensions.Azuremust upgrade it to7.1.0-preview2when upgradingMicrosoft.Data.SqlClient.
Compatibility guarantee: All aligned assemblies ship with
FileVersion 7.1.0.xandAssemblyVersion 7.0.0.0— unchanged from 7.0.2 — so upgrading from7.0.2to7.1.0-preview2does not require any new .NET Framework strong-name binding redirects.
Packages in this release
Microsoft.Data.SqlClient 7.1.0-preview2
Added
SqlConnection.GetSchemaAsyncoverloads withCancellationTokensupport (#3005)- SQL Graph pseudo-column aliases (
$node_id,$edge_id,$from_id,$to_id) accepted inSqlBulkCopymappings (#3677) SqlBatchCommand.CommandBehaviorandSqlBatch.ExecuteReader(CommandBehavior)are now honored (#4125)- Configurable idle connection timeout via
Connection Idle Timeout/SqlConnectionStringBuilder.IdleTimeout(opt-in viaSwitch.Microsoft.Data.SqlClient.UseLegacyIdleTimeoutBehavior=false) (#4295)
Changed
Connect Timeoutnow propagates through the pool whenSwitch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWait=trueis set (default off; introduces aMicrosoft.Bcl.TimeProviderdependency) (#4270)- SQL Server 2025
jsontype added to theDataTypescollection returned bySqlConnection.GetSchema(#3858) - Internal state-machine hardening via
Interlocked.CompareExchangeguards (#4267) - Internal cleanup of connection-options inheritance and related pool interfaces (#4237, #4261, #4235, #4415, #4334)
- LCID hardcoded mappings to avoid repeated culture lookups (#4212)
- Allocation reductions on
SqlErrorCollectionand null-return paths (#4157, #4099, #4102) - Improved
EnclaveDiffieHellmanInfo.Sizeaccuracy (#4346) SqlVector<float>serialization is now explicitly little-endian for cross-architecture consistency (#3861)- Bundled .NET 10 SDK updated to
10.0.300(#4287)
Fixed
NullReferenceExceptioninSqlCommand.Cancel()when the connection has already been torn down (#4372)- Always Encrypted CMK signature verification incorrectly reusing cached results after a prior failure (#4339)
- Missing TDS token / feature-ack length bounds checks (spoofing server could trigger unbounded allocations) (#4340)
SqlBulkCopyfailing in least-privilege environments (#4306)- Always Encrypted
CekMdVersion/EkValueCountreads aligned with the TDS specification (#4240) LoginWithFailoverparser-state validation (#4140)- SPN during login now uses the resolved port instead of instance name for
Protocol=None/Protocol=Admin(#4180) - Race in
SqlConnection.TryOpenInnerthat could surface asInvalidCastExceptionnow returns a deterministicInvalidOperationException(#4179) - Multiple
CancellationTokenSourceleaks inSqlDataReader,SqlConnection,SqlCommandreconnect paths, and sequential-stream helpers (#4009) - Docs fix for server certificate configuration (#4408)
Removed (breaking)
- SQL Server 7.0 / 2000 code paths removed;
Type System Version=SQL Server 2000now throwsArgumentExceptionat open. Applications should switch toLatest(or another supported value). No change to server-version support — 7.0 / 2000 were already rejected during login version negotiation. (#4015)
Full details: release-notes/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.Extensions.Azure 7.1.0-preview2
Added — WAM (Windows Account Manager) broker support for Entra ID authentication (Windows only) (#4288, #4388)
- Covers
ActiveDirectoryIntegrated,ActiveDirectoryInteractive,ActiveDirectoryDeviceCodeFlow, and the deprecatedActiveDirectoryPasswordmodes. - New
ActiveDirectoryAuthenticationProviderOptionstype (UseWamBroker,ApplicationClientId,DeviceCodeFlowCallback) and a newActiveDirectoryAuthenticationProvider(ActiveDirectoryAuthenticationProviderOptions)constructor overload. - New cross-platform
SetParentActivityOrWindowFunc(Func<object>?)(supersedes the .NET-Framework-onlySetIWin32WindowFunc). - New
useWamBrokerattribute on the<SqlClientAuthenticationProviders>configuration section. - Device Code Flow now uses its own token-lifetime timeout instead of inheriting
Connect Timeout, fixing spurious "The operation was canceled." failures when users take longer to enter the code. - WAM is enabled by default when the driver's built-in client id is used; opt-in via
UseWamBroker/ the config attribute when a custom client id is supplied. Non-Windows platforms never invoke the broker. - Footprint note: WAM materially increases the on-disk footprint of
Microsoft.Data.SqlClient.Extensions.Azurebecause it pulls inMicrosoft.Identity.Client.Brokerand its native OS-broker components. Tracking: #4410. - Sample: new
AzureSqlConnectorapp under doc/apps/AzureSqlConnector.
Changed
- Dependencies: added
Microsoft.Identity.Client.Broker4.84.2; updatedMicrosoft.Identity.Clientto 4.84.2.
Full details: release-notes/Extensions/Azure/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.0-preview2
- No functional or API changes; aligned version bump only.
Full details: release-notes/add-ons/AzureKeyVaultProvider/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.0-preview2
- No functional or API changes; aligned version bump only.
Full details: release-notes/Extensions/Abstractions/7.1/7.1.0-preview2.md
Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview2
- Internal-use-only package. No functional or API changes; aligned version bump only.
Full details: release-notes/Internal/Logging/7.1/7.1.0-preview2.md
Target Platforms
- .NET Framework 4.6.2+ (Windows x86, x64, ARM64)
- .NET 8.0+ (Windows x86, x64, ARM, ARM64; Linux; macOS)
Per-TFM dependency lists are in the linked release-notes files above.
Contributors
A huge thank you to our community contributors for this release:
- @edwardneal —
SqlConnection.GetSchemaAsync(#3005), SQL Graph column aliases (#3677), least-privilegeSqlBulkCopy(#4306), Always Encrypted TDS alignment (#4240), LCID mapping (#4212),SqlVectorlittle-endian (#3861),DataTypes+jsontype (#3858), test reliability (#4262, #4305) - @SimonCropp — SQL Server 7.0 / 2000 removal (#4015),
CancellationTokenSourcecleanup (#4009), error/warning fast path (#4157), additional code-health (#4099, #4102, #4158) - @campersau —
SqlBatchCommand.CommandBehavior(#4125) - @jnyrup —
EnclaveDiffieHellmanInfo.Size(#4346) - @shreyarao4 — Kerberos SSPI +
SequentialAccesstest fixes (#4146, #4224)
Stable Release - v7.0.2
This update brings the following changes since the 7.0.1 release:
Important — package version alignment: Starting with 7.0.2, the
Microsoft.Data.SqlClientdriver and its companion packages share a single aligned version. The following packages now ship together as7.0.2:
Microsoft.Data.SqlClientMicrosoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProviderMicrosoft.Data.SqlClient.Extensions.AzureMicrosoft.Data.SqlClient.Extensions.AbstractionsMicrosoft.Data.SqlClient.Internal.Logging(
Microsoft.SqlServer.Servercontinues to version independently and remains at1.0.0.)Applications must reference the same versions of
Microsoft.Data.SqlClientand its extensions for best compatibility. In particular, applications that referenceMicrosoft.Data.SqlClient.Extensions.Azuremust upgrade it to7.0.2when upgradingMicrosoft.Data.SqlClientto7.0.2.
Breaking change (.NET Framework only): As part of this alignment, the
AssemblyVersionofMicrosoft.Data.SqlClient.Extensions.Azure,Microsoft.Data.SqlClient.Extensions.Abstractions, andMicrosoft.Data.SqlClient.Internal.Loggingchanged from1.0.0.0to7.0.0.0(theMicrosoft.Data.SqlClientandMicrosoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProviderassembly versions are unchanged). On .NET Framework,AssemblyVersionis part of the strong-name identity, so applications that drop these assemblies into an existing deployment without rebuilding must rebuild against the 7.0.2 packages (or add binding redirects). Applications on .NET / .NET Core are not affected.
Companion package release notes
The following companion packages ship aligned as 7.0.2. See their individual release notes for package-specific changes (including the Microsoft.Data.SqlClient.Extensions.Azure WAM broker support):
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.0.2
- Microsoft.Data.SqlClient.Extensions.Azure 7.0.2
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.2
- Microsoft.Data.SqlClient.Internal.Logging 7.0.2
Fixed
-
Fixed a
NullReferenceExceptioninSqlCommand.Cancel(). The diagnostic message built during cancellation dereferenced the active connection directly; it now uses a null-conditional access so cancellation no longer throws when the connection has already been torn down.
(#4372,#4373) -
Fixed a
NullReferenceExceptioninSqlDataReaderwhen callingGetBytes/GetCharswith anulldestination buffer. The argument-validation path that constructs theInvalidDestinationBufferIndexexception now guards against the null buffer so the correctArgumentExceptionis surfaced instead of an NRE.
(#4159,#4206) -
Fixed Always Encrypted column master key signature verification incorrectly reusing cached results. The
SignatureVerificationCachelookup logic was corrected so signature verification outcomes are cached and retrieved against the correct key, preventing stale or mismatched verification results.
(#4339,#4343)
Changed
Hardened TDS token parsing with data-length bounds checks
What Changed:
- Added bounds checking when parsing TDS token and feature-extension-acknowledgment data lengths. The parser now validates the declared length of incoming token data against the available buffer before reading, rejecting malformed or out-of-range length values instead of reading past the intended boundary.
(#4340,#4358)
Who Benefits:
- All consumers benefit from improved resilience against malformed or hostile TDS responses. A server (or man-in-the-middle) sending an invalid token length can no longer drive the parser to read beyond the declared payload.
Impact:
- Connections that previously parsed malformed token streams loosely will now fail fast with a clear protocol error. Well-behaved SQL Server responses are unaffected.
Contributors
We thank the following public contributors. Their efforts toward this project are very much appreciated.
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM, Windows ARM64, Linux, macOS)
Dependencies
.NET 9.0
- Microsoft.Bcl.Cryptography 9.0.13
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.2
- Microsoft.Data.SqlClient.Internal.Logging 7.0.2
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 9.0.13
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 9.0.13
- System.Security.Cryptography.Pkcs 9.0.13
.NET 8.0
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.2
- Microsoft.Data.SqlClient.Internal.Logging 7.0.2
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
.NET Standard 2.0
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.2
- Microsoft.Data.SqlClient.Internal.Logging 7.0.2
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 10.0.3
- System.Threading.Channels 10.0.3
.NET Framework 4.6.2+
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.2
- Microsoft.Data.SqlClient.Internal.Logging 7.0.2
- Microsoft.Data.SqlClient.SNI 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- System.Buffers 4.6.1
- System.Data.Common 4.3.0
- System.Diagnostics.DiagnosticSource 10.0.3
- System.Memory 4.6.3
- System.Runtime.InteropServices.RuntimeInformation 4.3.0
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 10.0.3
- System.Threading.Channels 10.0.3
- System.ValueTuple 4.6.2
Stable Release v6.1.6
This update brings the following changes since the 6.1.5 release:
Added
WAM broker support for the supported Entra ID authentication modes (Windows only)
What Changed:
- Added support for the Web Account Manager (WAM) broker for the supported Microsoft Entra ID authentication modes. A new
ActiveDirectoryAuthenticationProviderOptionsoptions bag and a correspondingActiveDirectoryAuthenticationProvider(ActiveDirectoryAuthenticationProviderOptions options)constructor were introduced, exposing aUseWamBrokerproperty (alongsideApplicationClientIdandDeviceCodeFlowCallback).
(#4288, #4387) - Added a cross-platform
SetParentActivityOrWindowFunc(Func<object> parentActivityOrWindowFunc)method so callers can supply a parent window handle on Windows or a parentActivity/UIViewControlleron Android/iOS/MAUI.
Who Benefits:
- Applications using
ActiveDirectoryInteractiveand other supported Entra ID authentication modes on Windows benefit from the WAM broker's improved security (tokens are brokered by the OS), single sign-on with the logged-in Windows account, and support for Conditional Access and Windows Hello.
Impact:
- When you supply your
ApplicationClientId, WAM is opt-in viaActiveDirectoryAuthenticationProviderOptions.UseWamBroker. Consider enabling it when you want OS-brokered tokens, single sign-on with the signed-in Windows account, Windows Hello, and Conditional Access support. UseWamBrokeris a Windows-only setting and has no effect on non-Windows platforms, where interactive Entra ID flows always use the system browser.- Prefer the new options-bag constructor over the positional-argument overloads in new code.
var options = new ActiveDirectoryAuthenticationProviderOptions
{
ApplicationClientId = "<your-app-client-id>",
// Enable WAM (Windows only) for OS-brokered tokens, SSO, Windows Hello, and Conditional Access.
UseWamBroker = true,
};
var provider = new ActiveDirectoryAuthenticationProvider(options);
// Supply the parent window/activity that owns the interactive sign-in prompt.
provider.SetParentActivityOrWindowFunc(() => parentWindowHandle);
SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, provider);Changed
Hardened TDS token parsing with data-length bounds checks
What Changed:
- Added bounds checking when parsing TDS token data lengths. The parser now validates the declared length of incoming token data against the available buffer before reading, rejecting malformed or out-of-range length values instead of reading past the intended boundary.
(#4340, #4359)
Who Benefits:
- All consumers benefit from improved resilience against malformed or hostile TDS responses. A server (or man-in-the-middle) sending an invalid token length can no longer drive the parser to read beyond the declared payload.
Impact:
- Connections that previously parsed malformed token streams loosely will now fail fast with a clear protocol error. Well-behaved SQL Server responses are unaffected.
Other changes
- Updated dependencies (#4387):
- Updated
Microsoft.Identity.Clientto 4.84.2 (was 4.80.0) - Added
Microsoft.Identity.Client.Broker4.84.2
- Updated
Fixed
-
Fixed a
NullReferenceExceptioninSqlDataReader.GetCharson the PLP +CommandBehavior.SequentialAccesspath when anullbuffer was passed together with a negativebufferIndex. The call now correctly throwsArgumentOutOfRangeExceptionfor thebufferIndexparameter.
(#4159, #4205) -
Fixed column master key (CMK) signature verification caching where
GetSignatureVerificationResultreturned whether the cache key existed rather than the cached value itself. Once a signature verification failure was cached asfalse, subsequent lookups incorrectly returnedtrue, causing the caller to skip re-verification and treat the column master key as having a valid signature.
(#4339, #4356)
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
Dependencies
.NET Framework 4.6.2
- Azure.Core 1.50.0
- Azure.Identity 1.17.1
- Microsoft.Data.SqlClient.SNI 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.Identity.Client 4.84.2
- Microsoft.Identity.Client.Broker 4.84.2
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- System.Buffers 4.6.1
- System.Data.Common 4.3.0
- System.Diagnostics.DiagnosticSource 8.0.1
- System.IdentityModel.Tokens.Jwt 7.7.1
- System.Memory 4.6.3
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 8.0.6
- System.Text.RegularExpressions 4.3.1
.NET 8.0
- Azure.Core 1.50.0
- Azure.Identity 1.17.1
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.Identity.Client 4.84.2
- Microsoft.Identity.Client.Broker 4.84.2
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Diagnostics.DiagnosticSource 8.0.1
- System.IdentityModel.Tokens.Jwt 7.7.1
- System.Security.Cryptography.Pkcs 8.0.1
.NET 9.0
- Azure.Core 1.50.0
- Azure.Identity 1.17.1
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 9.0.11
- Microsoft.Identity.Client 4.84.2
- Microsoft.Identity.Client.Broker 4.84.2
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 9.0.11
- System.Diagnostics.DiagnosticSource 9.0.11
- System.IdentityModel.Tokens.Jwt 7.7.1
- System.Security.Cryptography.Pkcs 9.0.11
.NET Standard 2.0
- Azure.Core 1.50.0
- Azure.Identity 1.17.1
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.Identity.Client 4.84.2
- Microsoft.Identity.Client.Broker 4.84.2
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Diagnostics.DiagnosticSource 8.0.1
- System.IdentityModel.Tokens.Jwt 7.7.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 8.0.6