Skip to content

Commit 2bc2049

Browse files
committed
Added Microsoft.Identity.Client 4.80.0 as a new direct dependency.
1 parent a3b7550 commit 2bc2049

15 files changed

Lines changed: 66 additions & 0 deletions

File tree

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
3232
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
3333
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
34+
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
3435
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
3536
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
3637
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,7 @@
856856
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
857857
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
858858
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
859+
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
859860
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
860861
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
861862
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />

src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4040
</PackageReference>
4141
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
42+
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
4243
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
4344
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
4445
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@
881881
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
882882
</PackageReference>
883883
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
884+
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
884885
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
885886
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
886887
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,12 @@ previousPw is byte[] previousPwBytes &&
261261

262262
if (result == null)
263263
{
264+
#pragma warning disable CS0618 // Type or member is obsolete
264265
result = await app.AcquireTokenByUsernamePassword(scopes, parameters.UserId, parameters.Password)
265266
.WithCorrelationId(parameters.ConnectionId)
266267
.ExecuteAsync(cancellationToken: cts.Token)
267268
.ConfigureAwait(false);
269+
#pragma warning disable CS0618 // Type or member is obsolete
268270

269271
// We cache the password hash to ensure future connection requests include a validated password
270272
// when we check for a cached MSAL account. Otherwise, a connection request with the same username

src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@
1515
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
1616
<PackageReference Condition="$(ReferenceType)=='Package'" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
1717
</ItemGroup>
18+
19+
<!--
20+
Promote some .NET 9 transitive references to direct ones to avoid NuGet
21+
warnings aboud conflicts with the .NET 8 versions.
22+
-->
23+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
24+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="$(MicrosoftExtensionsCachingAbstractionsVersion)" />
25+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
26+
<PackageReference Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsOptionsVersion)" />
27+
</ItemGroup>
1828
</Project>

src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ private static Task<string> AcquireTokenAsync(string authorityURL, string userID
284284
SecureString securePassword = new SecureString();
285285

286286
securePassword.MakeReadOnly();
287+
#pragma warning disable CS0618 // Type or member is obsolete
287288
result = app.AcquireTokenByUsernamePassword(scopes, userID, password).ExecuteAsync().Result;
289+
#pragma warning restore CS0618 // Type or member is obsolete
288290

289291
return result.AccessToken;
290292
});

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ public override async Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthenti
4040
string[] scopes = new string[] { scope };
4141
SecureString password = new SecureString();
4242

43+
#pragma warning disable CS0618 // Type or member is obsolete
4344
AuthenticationResult result = await PublicClientApplicationBuilder.Create(_appClientId)
4445
.WithAuthority(parameters.Authority)
4546
.Build().AcquireTokenByUsernamePassword(scopes, parameters.UserId, parameters.Password)
4647
.WithCorrelationId(parameters.ConnectionId)
4748
.ExecuteAsync(cancellationToken: cts.Token);
49+
#pragma warning restore CS0618 // Type or member is obsolete
4850

4951
return new SqlAuthenticationToken(result.AccessToken, result.ExpiresOn);
5052
}

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@
1818
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
1919
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
2020
</ItemGroup>
21+
22+
<!--
23+
Promote some .NET 9 transitive references to direct ones to avoid NuGet
24+
warnings aboud conflicts with the .NET 8 versions.
25+
-->
26+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
27+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="$(MicrosoftExtensionsCachingAbstractionsVersion)" />
28+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
29+
<PackageReference Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsOptionsVersion)" />
30+
</ItemGroup>
2131
</Project>

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@
1818
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
1919
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
2020
</ItemGroup>
21+
22+
<!--
23+
Promote some .NET 9 transitive references to direct ones to avoid NuGet
24+
warnings aboud conflicts with the .NET 8 versions.
25+
-->
26+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
27+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="$(MicrosoftExtensionsCachingAbstractionsVersion)" />
28+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
29+
<PackageReference Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsOptionsVersion)" />
30+
</ItemGroup>
2131
</Project>

0 commit comments

Comments
 (0)