Skip to content

Commit 9806917

Browse files
fix: update msal dependencies (#3548)
* fix: update msal dependencies * revert debug testing change --------- Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com>
1 parent 5f6bc30 commit 9806917

6 files changed

Lines changed: 19 additions & 13 deletions

File tree

src/Authentication/Authentication.Core/Microsoft.Graph.Authentication.Core.csproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<LangVersion>9.0</LangVersion>
55
<TargetFrameworks>netstandard2.0;net6.0;net472</TargetFrameworks>
66
<RootNamespace>Microsoft.Graph.PowerShell.Authentication.Core</RootNamespace>
7-
<Version>2.32.0</Version>
7+
<Version>2.35.1</Version>
88
<!-- Suppress .NET Target Framework Moniker (TFM) Support Build Warnings -->
99
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
1010
</PropertyGroup>
@@ -13,11 +13,14 @@
1313
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1414
</PropertyGroup>
1515
<ItemGroup>
16-
<PackageReference Include="Azure.Identity" Version="1.17.1" />
17-
<PackageReference Include="Azure.Identity.Broker" Version="1.3.1" />
16+
<PackageReference Include="Azure.Identity" Version="1.18.0" />
17+
<PackageReference Include="Azure.Identity.Broker" Version="1.4.0" />
18+
<!-- Explicitly reference Microsoft.Identity.Client to ensure form_post support -->
19+
<PackageReference Include="Microsoft.Identity.Client" Version="4.82.1" />
20+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.3" />
1821
<PackageReference Include="Microsoft.Graph.Core" Version="3.2.5" />
1922
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
20-
<PackageReference Include="System.Text.Json" Version="8.0.6" />
23+
<PackageReference Include="System.Text.Json" Version="10.0.3" />
2124
</ItemGroup>
2225
<Target Name="CopyFiles" AfterTargets="Build">
2326
<Copy SourceFiles="@(PreLoadAssemblies)" DestinationFolder="$(OutputPath)/publish" />

src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ private static async Task<TokenCredential> GetEnvironmentCredentialAsync(IAuthCo
7878

7979
private static bool IsAuthFlowNotSupported()
8080
{
81-
return ((!string.IsNullOrEmpty(EnvironmentVariables.Username) && !string.IsNullOrEmpty(EnvironmentVariables.Password))
82-
&& (string.IsNullOrEmpty(EnvironmentVariables.ClientSecret) && string.IsNullOrEmpty(EnvironmentVariables.ClientCertificatePath)));
81+
return !string.IsNullOrEmpty(EnvironmentVariables.Username) && !string.IsNullOrEmpty(EnvironmentVariables.Password)
82+
&& string.IsNullOrEmpty(EnvironmentVariables.ClientSecret) && string.IsNullOrEmpty(EnvironmentVariables.ClientCertificatePath);
8383
}
8484

8585
private static bool ShouldUseWam(IAuthContext authContext)
@@ -138,7 +138,7 @@ private static async Task<InteractiveBrowserCredential> GetInteractiveBrowserCre
138138
{
139139
return interactiveBrowserCredential.AuthenticateAsync(new TokenRequestContext(authContext.Scopes), cancellationToken);
140140
});
141-
}
141+
}
142142
await WriteAuthRecordAsync(authRecord).ConfigureAwait(false);
143143
return interactiveBrowserCredential;
144144
}

src/Authentication/Authentication.Test/Microsoft.Graph.Authentication.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<TargetFrameworks>net8.0;net472</TargetFrameworks>
44
<IsPackable>false</IsPackable>
5-
<Version>2.32.0</Version>
5+
<Version>2.35.1</Version>
66
</PropertyGroup>
77
<ItemGroup>
88
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />

src/Authentication/Authentication/Microsoft.Graph.Authentication.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<WarningsAsErrors />
1111
<NuspecFile>Microsoft.Graph.Authentication.nuspec</NuspecFile>
1212
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
13-
<Version>2.32.0</Version>
13+
<Version>2.35.1</Version>
1414
</PropertyGroup>
1515
<PropertyGroup>
1616
<EnableNETAnalyzers>true</EnableNETAnalyzers>

src/Authentication/Authentication/Microsoft.Graph.Authentication.nuspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package>
33
<metadata>
4-
<version>2.32.0</version>
4+
<version>2.35.1</version>
55
<id>Microsoft.Graph.Authentication</id>
66
<description>Microsoft Graph PowerShell authentication module</description>
77
<authors>Microsoft</authors>
@@ -36,9 +36,12 @@
3636
<file src="artifacts\Dependencies\Microsoft.IdentityModel.Abstractions.dll" target="Dependencies" />
3737
<file src="artifacts\Dependencies\System.Buffers.dll" target="Dependencies" />
3838
<file src="artifacts\Dependencies\System.ClientModel.dll" target="Dependencies" />
39+
<file src="artifacts\Dependencies\System.Diagnostics.DiagnosticSource.dll" target="Dependencies" />
40+
<file src="artifacts\Dependencies\System.IO.Pipelines.dll" target="Dependencies" />
3941
<file src="artifacts\Dependencies\System.Memory.dll" target="Dependencies" />
4042
<file src="artifacts\Dependencies\System.Memory.Data.dll" target="Dependencies" />
4143
<file src="artifacts\Dependencies\System.Text.Json.dll" target="Dependencies" />
44+
<file src="artifacts\Dependencies\System.Text.Encodings.Web.dll" target="Dependencies" />
4245
<file src="artifacts\Dependencies\System.Threading.Tasks.Extensions.dll" target="Dependencies" />
4346
<file src="artifacts\Dependencies\Microsoft.Kiota.Abstractions.dll" target="Dependencies" />
4447
<file src="artifacts\Dependencies\Microsoft.Kiota.Authentication.Azure.dll" target="Dependencies" />
@@ -64,7 +67,6 @@
6467
<file src="artifacts\Dependencies\Desktop\System.Diagnostics.DiagnosticSource.dll" target="Dependencies\Desktop" />
6568
<file src="artifacts\Dependencies\Desktop\System.Numerics.Vectors.dll" target="Dependencies\Desktop" />
6669
<file src="artifacts\Dependencies\Desktop\System.Runtime.CompilerServices.Unsafe.dll" target="Dependencies\Desktop" />
67-
<file src="artifacts\Dependencies\Desktop\System.Text.Encodings.Web.dll" target="Dependencies\Desktop" />
6870
<file src="artifacts\Dependencies\Desktop\System.Net.Http.WinHttpHandler.dll" target="Dependencies\Desktop" />
6971
<file src="artifacts\Dependencies\Desktop\System.Security.Cryptography.ProtectedData.dll" target="Dependencies\Desktop" />
7072
</files>

src/Authentication/Authentication/ModuleInitializer.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ public void OnRemove(PSModuleInfo psModuleInfo)
8686
private static bool IsAssemblyMatching(AssemblyName assemblyName, Assembly requestingAssembly)
8787
{
8888
return requestingAssembly != null
89-
? (requestingAssembly.FullName.StartsWith("Microsoft")
89+
? (requestingAssembly.FullName.StartsWith("Microsoft")
9090
|| requestingAssembly.FullName.StartsWith("Azure.Identity")
91-
|| requestingAssembly.FullName.StartsWith("Azure.Core")) && IsAssemblyPresent(assemblyName)
91+
|| requestingAssembly.FullName.StartsWith("Azure.Core")
92+
|| requestingAssembly.FullName.StartsWith("System.Text.Json")) && IsAssemblyPresent(assemblyName)
9293
: IsAssemblyPresent(assemblyName);
9394
}
9495

0 commit comments

Comments
 (0)