Skip to content

Commit c12134a

Browse files
[6.0] Update Azure.Identity and other dependencies (#3538) (#3553)
* Update Azure.Identity and other dependencies (#3538) * Missing updates * Fixes * Fix updates * Update test
1 parent ea12280 commit c12134a

File tree

5 files changed

+28
-21
lines changed

5 files changed

+28
-21
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,21 @@ public override async Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthenti
223223
{
224224
if (!string.IsNullOrEmpty(parameters.UserId))
225225
{
226+
// The AcquireTokenByIntegratedWindowsAuth method is marked as obsolete in MSAL.NET
227+
// but it is still a supported way to acquire tokens for Active Directory Integrated authentication.
228+
#pragma warning disable CS0618 // Type or member is obsolete
226229
result = await app.AcquireTokenByIntegratedWindowsAuth(scopes)
230+
#pragma warning restore CS0618 // Type or member is obsolete
227231
.WithCorrelationId(parameters.ConnectionId)
228232
.WithUsername(parameters.UserId)
229233
.ExecuteAsync(cancellationToken: cts.Token)
230234
.ConfigureAwait(false);
231235
}
232236
else
233237
{
238+
#pragma warning disable CS0618 // Type or member is obsolete
234239
result = await app.AcquireTokenByIntegratedWindowsAuth(scopes)
240+
#pragma warning restore CS0618 // Type or member is obsolete
235241
.WithCorrelationId(parameters.ConnectionId)
236242
.ExecuteAsync(cancellationToken: cts.Token)
237243
.ConfigureAwait(false);

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ public static void ActiveDirectoryManagedIdentityWithInvalidUserIdMustFail(strin
501501

502502
SqlException e = Assert.Throws<SqlException>(() => ConnectAndDisconnect(connStrWithNoCred));
503503

504-
string expectedMessage = "ManagedIdentityCredential authentication unavailable";
504+
string expectedMessage = "[Managed Identity] Authentication";
505505
Assert.Contains(expectedMessage, e.GetBaseException().Message);
506506
}
507507

tools/props/Versions.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
<MicrosoftDataSqlClientSniVersion>6.0.2</MicrosoftDataSqlClientSniVersion>
2727
<SystemBuffersVersion>4.5.1</SystemBuffersVersion>
2828
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
29-
<SystemTextEncodingsWebVersion>6.0.0</SystemTextEncodingsWebVersion>
30-
<SystemTextJsonVersion>6.0.10</SystemTextJsonVersion>
29+
<SystemTextEncodingsWebVersion>8.0.0</SystemTextEncodingsWebVersion>
30+
<SystemTextJsonVersion>8.0.5</SystemTextJsonVersion>
3131
</PropertyGroup>
3232
<!-- NetFx and NetCore project dependencies -->
3333
<PropertyGroup>
34-
<AzureIdentityVersion>1.11.4</AzureIdentityVersion>
34+
<AzureIdentityVersion>1.14.2</AzureIdentityVersion>
3535
<MicrosoftBclCryptographyVersion>8.0.0</MicrosoftBclCryptographyVersion>
3636
<MicrosoftExtensionsCachingMemoryVersion>8.0.1</MicrosoftExtensionsCachingMemoryVersion>
3737
<MicrosoftIdentityModelJsonWebTokensVersion>7.5.0</MicrosoftIdentityModelJsonWebTokensVersion>
@@ -47,8 +47,8 @@
4747
</PropertyGroup>
4848
<!-- AKV Provider project dependencies -->
4949
<PropertyGroup>
50-
<AzureCoreVersion>[1.38.0,2.0.0)</AzureCoreVersion>
51-
<AzureSecurityKeyVaultKeysVersion>[4.5.0,5.0.0)</AzureSecurityKeyVaultKeysVersion>
50+
<AzureCoreVersion>[1.47.1,2.0.0)</AzureCoreVersion>
51+
<AzureSecurityKeyVaultKeysVersion>[4.7.0,5.0.0)</AzureSecurityKeyVaultKeysVersion>
5252
</PropertyGroup>
5353
<!-- Test Project Dependencies -->
5454
<PropertyGroup>

tools/specs/Microsoft.Data.SqlClient.nuspec

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,39 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
2929
<tags>sqlclient microsoft.data.sqlclient</tags>
3030
<dependencies>
3131
<group targetFramework="net462">
32+
<dependency id="Azure.Identity" version="1.14.2" />
33+
<dependency id="Microsoft.Bcl.Cryptography" version="8.0.0" />
3234
<dependency id="Microsoft.Data.SqlClient.SNI" version="6.0.2" />
33-
<dependency id="Azure.Identity" version="1.11.4" />
3435
<dependency id="Microsoft.Extensions.Caching.Memory" version="8.0.1" exclude="Compile" />
3536
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="7.5.0" />
3637
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="7.5.0" />
3738
<dependency id="System.Buffers" version="4.5.1" />
38-
<dependency id="System.Text.Encodings.Web" version="6.0.0" />
39-
<dependency id="System.Text.Json" version="6.0.10" />
39+
<dependency id="System.Text.Encodings.Web" version="8.0.0" />
40+
<dependency id="System.Text.Json" version="8.0.5" />
4041
<dependency id="System.Security.Cryptography.Pkcs" version="8.0.1"/>
41-
<dependency id="Microsoft.Bcl.Cryptography" version="8.0.0"/>
4242
</group>
4343
<group targetFramework="net8.0">
44+
<dependency id="Azure.Identity" version="1.14.2" />
45+
<dependency id="Microsoft.Bcl.Cryptography" version="8.0.0" />
4446
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="6.0.2" exclude="Compile" />
45-
<dependency id="Azure.Identity" version="1.11.4" />
4647
<dependency id="Microsoft.Extensions.Caching.Memory" version="8.0.1" exclude="Compile" />
4748
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="7.5.0" />
4849
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="7.5.0" />
4950
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
5051
<dependency id="System.Configuration.ConfigurationManager" version="8.0.1" exclude="Compile" />
5152
<dependency id="System.Security.Cryptography.Pkcs" version="8.0.1"/>
52-
<dependency id="Microsoft.Bcl.Cryptography" version="8.0.0"/>
5353
</group>
5454
<group targetFramework="net9.0">
55+
<dependency id="Azure.Identity" version="1.14.2" />
56+
<dependency id="Microsoft.Bcl.Cryptography" version="9.0.4" />
5557
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="6.0.2" exclude="Compile" />
56-
<dependency id="Azure.Identity" version="1.11.4" />
5758
<dependency id="Microsoft.Extensions.Caching.Memory" version="9.0.4" exclude="Compile" />
5859
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="7.5.0" />
5960
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="7.5.0" />
6061
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
6162
<dependency id="System.Configuration.ConfigurationManager" version="9.0.4" exclude="Compile" />
62-
<dependency id="System.Security.Cryptography.Pkcs" version="9.0.4"/>
63-
<dependency id="Microsoft.Bcl.Cryptography" version="9.0.4"/>
63+
<dependency id="System.Security.Cryptography.Pkcs" version="9.0.4" />
64+
<dependency id="System.Text.Json" version="9.0.5" />
6465
</group>
6566
</dependencies>
6667
<frameworkAssemblies>

tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyStoreProvider.SqlColumnEncrypti
2626
<dependencies>
2727
<group targetFramework="net462">
2828
<dependency id="Microsoft.Data.SqlClient" version="[6.0.1,6.1.0)" />
29-
<dependency id="Azure.Core" version="[1.38.0,2.0.0)" />
30-
<dependency id="Azure.Security.KeyVault.Keys" version="[4.5.0,5.0.0)" />
29+
<dependency id="Azure.Core" version="[1.47.1,2.0.0)" />
30+
<dependency id="Azure.Security.KeyVault.Keys" version="[4.7.0,5.0.0)" />
3131
<dependency id="Microsoft.Extensions.Caching.Memory" version="8.0.1" />
3232
</group>
3333
<group targetFramework="net8.0">
3434
<dependency id="Microsoft.Data.SqlClient" version="[6.0.1,6.1.0)" />
35-
<dependency id="Azure.Core" version="[1.38.0,2.0.0)" />
36-
<dependency id="Azure.Security.KeyVault.Keys" version="[4.5.0,5.0.0)" />
35+
<dependency id="Azure.Core" version="[1.47.1,2.0.0)" />
36+
<dependency id="Azure.Security.KeyVault.Keys" version="[4.7.0,5.0.0)" />
3737
<dependency id="Microsoft.Extensions.Caching.Memory" version="8.0.1" />
3838
</group>
3939
<group targetFramework="net9.0">
4040
<dependency id="Microsoft.Data.SqlClient" version="[6.0.1,6.1.0)" />
41-
<dependency id="Azure.Core" version="[1.38.0,2.0.0)" />
42-
<dependency id="Azure.Security.KeyVault.Keys" version="[4.5.0,5.0.0)" />
41+
<dependency id="Azure.Core" version="[1.47.1,2.0.0)" />
42+
<dependency id="Azure.Security.KeyVault.Keys" version="[4.7.0,5.0.0)" />
4343
<dependency id="Microsoft.Extensions.Caching.Memory" version="9.0.4" />
4444
</group>
4545
</dependencies>

0 commit comments

Comments
 (0)