From 71cff4c19e496b0cd5c973d798a6241e6344ffb8 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> Date: Fri, 8 Aug 2025 09:43:03 -0700 Subject: [PATCH 1/5] Update Azure.Identity and other dependencies (#3538) --- .../ActiveDirectoryAuthenticationProvider.cs | 6 ++++++ tools/props/Versions.props | 4 ++-- tools/specs/Microsoft.Data.SqlClient.nuspec | 10 ++++++++-- ...ient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec | 12 ++++++------ 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs index 8601d1f1ee..a94c6d7a6d 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs @@ -223,7 +223,11 @@ public override async Task AcquireTokenAsync(SqlAuthenti { if (!string.IsNullOrEmpty(parameters.UserId)) { + // The AcquireTokenByIntegratedWindowsAuth method is marked as obsolete in MSAL.NET + // but it is still a supported way to acquire tokens for Active Directory Integrated authentication. +#pragma warning disable CS0618 // Type or member is obsolete result = await app.AcquireTokenByIntegratedWindowsAuth(scopes) +#pragma warning restore CS0618 // Type or member is obsolete .WithCorrelationId(parameters.ConnectionId) .WithUsername(parameters.UserId) .ExecuteAsync(cancellationToken: cts.Token) @@ -231,7 +235,9 @@ public override async Task AcquireTokenAsync(SqlAuthenti } else { +#pragma warning disable CS0618 // Type or member is obsolete result = await app.AcquireTokenByIntegratedWindowsAuth(scopes) +#pragma warning restore CS0618 // Type or member is obsolete .WithCorrelationId(parameters.ConnectionId) .ExecuteAsync(cancellationToken: cts.Token) .ConfigureAwait(false); diff --git a/tools/props/Versions.props b/tools/props/Versions.props index 3ffb1438ab..d86c59dbe6 100644 --- a/tools/props/Versions.props +++ b/tools/props/Versions.props @@ -31,7 +31,7 @@ - 1.11.4 + 1.14.2 8.0.0 8.0.1 7.5.0 @@ -47,7 +47,7 @@ - [1.38.0,2.0.0) + [1.47.1,2.0.0) [4.5.0,5.0.0) diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 0dad456fb9..3a263119d8 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -29,6 +29,8 @@ When using NuGet 3.x this package requires at least version 3.4. sqlclient microsoft.data.sqlclient + + @@ -41,6 +43,8 @@ When using NuGet 3.x this package requires at least version 3.4. + + @@ -52,6 +56,8 @@ When using NuGet 3.x this package requires at least version 3.4. + + @@ -59,8 +65,8 @@ When using NuGet 3.x this package requires at least version 3.4. - - + + diff --git a/tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec b/tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec index bb237f6df7..075ca0ecad 100644 --- a/tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec +++ b/tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec @@ -26,20 +26,20 @@ Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyStoreProvider.SqlColumnEncrypti - - + + - - + + - - + + From 790878c4518644bdbe3ea61cbf304f7b9816f724 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Fri, 8 Aug 2025 10:24:12 -0700 Subject: [PATCH 2/5] Missing updates --- tools/props/Versions.props | 4 ++-- tools/specs/Microsoft.Data.SqlClient.nuspec | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/props/Versions.props b/tools/props/Versions.props index d86c59dbe6..5b1f626293 100644 --- a/tools/props/Versions.props +++ b/tools/props/Versions.props @@ -26,8 +26,8 @@ 6.0.2 4.5.1 4.5.5 - 6.0.0 - 6.0.10 + 8.0.0 + 8.0.5 diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 3a263119d8..44a1d132a8 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -32,13 +32,12 @@ When using NuGet 3.x this package requires at least version 3.4. - - - + + @@ -46,7 +45,6 @@ When using NuGet 3.x this package requires at least version 3.4. - From 86db850e3837d268a32af01924bdced2f7e8c872 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Fri, 8 Aug 2025 10:25:36 -0700 Subject: [PATCH 3/5] Fixes --- tools/specs/Microsoft.Data.SqlClient.nuspec | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 44a1d132a8..c7293f708b 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -39,7 +39,6 @@ When using NuGet 3.x this package requires at least version 3.4. - @@ -51,13 +50,11 @@ When using NuGet 3.x this package requires at least version 3.4. - - From bbb1f5985070889595b1621930a03ce891da1129 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Fri, 8 Aug 2025 10:26:51 -0700 Subject: [PATCH 4/5] Fix updates --- tools/props/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/props/Versions.props b/tools/props/Versions.props index 5b1f626293..aee1d8949b 100644 --- a/tools/props/Versions.props +++ b/tools/props/Versions.props @@ -48,7 +48,7 @@ [1.47.1,2.0.0) - [4.5.0,5.0.0) + [4.7.0,5.0.0) From e338cfb3f77145026886d337dfbcad46c1c01ac7 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Tue, 12 Aug 2025 08:49:08 -0700 Subject: [PATCH 5/5] Update test --- .../ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs index 43c69919d6..a61d9039ad 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs @@ -501,7 +501,7 @@ public static void ActiveDirectoryManagedIdentityWithInvalidUserIdMustFail(strin SqlException e = Assert.Throws(() => ConnectAndDisconnect(connStrWithNoCred)); - string expectedMessage = "ManagedIdentityCredential authentication unavailable"; + string expectedMessage = "[Managed Identity] Authentication"; Assert.Contains(expectedMessage, e.GetBaseException().Message); }