This update brings the following changes since the 1.0.0 release of Microsoft.Data.SqlClient.Extensions.Azure.
Version alignment: Starting with this release, the package version is aligned with the core
Microsoft.Data.SqlClientdriver version (7.0.2). The previous release of this package was1.0.0.
Breaking change (.NET Framework only): As part of this alignment, the assembly's
AssemblyVersionchanged from1.0.0.0to7.0.0.0. On .NET Framework,AssemblyVersionis part of the strong-name identity, so applications that replace this assembly in an existing deployment without rebuilding must rebuild against7.0.2(or add a binding redirect). Applications on .NET / .NET Core are not affected.
What Changed:
- Added support for the Web Account Manager (WAM) broker for Microsoft Entra ID authentication flows. A new
ActiveDirectoryAuthenticationProviderOptionsoptions bag and a correspondingActiveDirectoryAuthenticationProvider(ActiveDirectoryAuthenticationProviderOptions options)constructor were introduced, exposing aUseWamBrokerproperty (alongsideApplicationClientIdandDeviceCodeFlowCallback). - Added a cross-platform
SetParentActivityOrWindowFunc(Func<object>?)method so callers can supply the parent window/activity used for interactive authentication UI — a window handle on Windows (where it also integrates with the WAM broker), or anActivity/UIViewControlleron Android/iOS. This supersedes the .NET Framework-onlySetIWin32WindowFunc. (#4288, #4388)
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:
- Enable the WAM broker by setting
ActiveDirectoryAuthenticationProviderOptions.UseWamBrokertotrueand passing the options to the new constructor. Consider enabling it when you want OS-brokered token security, single sign-on with the signed-in Windows account, or support for Conditional Access and Windows Hello. 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>",
UseWamBroker = true, // Windows only
};
var provider = new ActiveDirectoryAuthenticationProvider(options);
SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, provider);- A new
AzureSqlConnectorsample demonstrating interactive Entra ID authentication with and without the WAM broker was added under doc/apps/AzureSqlConnector.
- Updated Dependencies
(#4288):
- Added
Microsoft.Identity.Client.Brokerv4.84.2 (required for WAM broker support). - Updated
Microsoft.Identity.Clientto v4.84.2.
- Added
- .NET Standard 2.0
- .NET Framework 4.6.2+
- Azure.Core 1.51.1
- Azure.Identity 1.18.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.2
- Microsoft.Data.SqlClient.Internal.Logging 7.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.Identity.Client 4.84.2
- Microsoft.Identity.Client.Broker 4.84.2
- Azure.Core 1.51.1
- Azure.Identity 1.18.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.2
- Microsoft.Data.SqlClient.Internal.Logging 7.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.Identity.Client 4.84.2
- Microsoft.Identity.Client.Broker 4.84.2