Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<LangVersion>9.0</LangVersion>
<TargetFrameworks>netstandard2.0;net6.0;net472</TargetFrameworks>
<RootNamespace>Microsoft.Graph.PowerShell.Authentication.Core</RootNamespace>
<Version>2.32.0</Version>
<Version>2.35.1</Version>
<!-- Suppress .NET Target Framework Moniker (TFM) Support Build Warnings -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
Expand All @@ -13,11 +13,14 @@
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.17.1" />
<PackageReference Include="Azure.Identity.Broker" Version="1.3.1" />
<PackageReference Include="Azure.Identity" Version="1.18.0" />
<PackageReference Include="Azure.Identity.Broker" Version="1.4.0" />
<!-- Explicitly reference Microsoft.Identity.Client to ensure form_post support -->
<PackageReference Include="Microsoft.Identity.Client" Version="4.82.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.3" />
<PackageReference Include="Microsoft.Graph.Core" Version="3.2.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.6" />
<PackageReference Include="System.Text.Json" Version="10.0.3" />
</ItemGroup>
<Target Name="CopyFiles" AfterTargets="Build">
<Copy SourceFiles="@(PreLoadAssemblies)" DestinationFolder="$(OutputPath)/publish" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ private static async Task<TokenCredential> GetEnvironmentCredentialAsync(IAuthCo

private static bool IsAuthFlowNotSupported()
{
return ((!string.IsNullOrEmpty(EnvironmentVariables.Username) && !string.IsNullOrEmpty(EnvironmentVariables.Password))
&& (string.IsNullOrEmpty(EnvironmentVariables.ClientSecret) && string.IsNullOrEmpty(EnvironmentVariables.ClientCertificatePath)));
return !string.IsNullOrEmpty(EnvironmentVariables.Username) && !string.IsNullOrEmpty(EnvironmentVariables.Password)
&& string.IsNullOrEmpty(EnvironmentVariables.ClientSecret) && string.IsNullOrEmpty(EnvironmentVariables.ClientCertificatePath);
}

private static bool ShouldUseWam(IAuthContext authContext)
Expand Down Expand Up @@ -138,7 +138,7 @@ private static async Task<InteractiveBrowserCredential> GetInteractiveBrowserCre
{
return interactiveBrowserCredential.AuthenticateAsync(new TokenRequestContext(authContext.Scopes), cancellationToken);
});
}
}
await WriteAuthRecordAsync(authRecord).ConfigureAwait(false);
return interactiveBrowserCredential;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<IsPackable>false</IsPackable>
<Version>2.32.0</Version>
<Version>2.35.1</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<WarningsAsErrors />
<NuspecFile>Microsoft.Graph.Authentication.nuspec</NuspecFile>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<Version>2.32.0</Version>
<Version>2.35.1</Version>
</PropertyGroup>
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<metadata>
<version>2.32.0</version>
<version>2.35.1</version>
<id>Microsoft.Graph.Authentication</id>
<description>Microsoft Graph PowerShell authentication module</description>
<authors>Microsoft</authors>
Expand Down Expand Up @@ -36,9 +36,12 @@
<file src="artifacts\Dependencies\Microsoft.IdentityModel.Abstractions.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.Buffers.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.ClientModel.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.Diagnostics.DiagnosticSource.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.IO.Pipelines.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.Memory.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.Memory.Data.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.Text.Json.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.Text.Encodings.Web.dll" target="Dependencies" />
<file src="artifacts\Dependencies\System.Threading.Tasks.Extensions.dll" target="Dependencies" />
<file src="artifacts\Dependencies\Microsoft.Kiota.Abstractions.dll" target="Dependencies" />
<file src="artifacts\Dependencies\Microsoft.Kiota.Authentication.Azure.dll" target="Dependencies" />
Expand All @@ -64,7 +67,6 @@
<file src="artifacts\Dependencies\Desktop\System.Diagnostics.DiagnosticSource.dll" target="Dependencies\Desktop" />
<file src="artifacts\Dependencies\Desktop\System.Numerics.Vectors.dll" target="Dependencies\Desktop" />
<file src="artifacts\Dependencies\Desktop\System.Runtime.CompilerServices.Unsafe.dll" target="Dependencies\Desktop" />
<file src="artifacts\Dependencies\Desktop\System.Text.Encodings.Web.dll" target="Dependencies\Desktop" />
<file src="artifacts\Dependencies\Desktop\System.Net.Http.WinHttpHandler.dll" target="Dependencies\Desktop" />
<file src="artifacts\Dependencies\Desktop\System.Security.Cryptography.ProtectedData.dll" target="Dependencies\Desktop" />
</files>
Expand Down
5 changes: 3 additions & 2 deletions src/Authentication/Authentication/ModuleInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ public void OnRemove(PSModuleInfo psModuleInfo)
private static bool IsAssemblyMatching(AssemblyName assemblyName, Assembly requestingAssembly)
{
return requestingAssembly != null
? (requestingAssembly.FullName.StartsWith("Microsoft")
? (requestingAssembly.FullName.StartsWith("Microsoft")
|| requestingAssembly.FullName.StartsWith("Azure.Identity")
|| requestingAssembly.FullName.StartsWith("Azure.Core")) && IsAssemblyPresent(assemblyName)
|| requestingAssembly.FullName.StartsWith("Azure.Core")
|| requestingAssembly.FullName.StartsWith("System.Text.Json")) && IsAssemblyPresent(assemblyName)
: IsAssemblyPresent(assemblyName);
}

Expand Down
Loading