diff --git a/src/Authentication/Authentication.Core/Microsoft.Graph.Authentication.Core.csproj b/src/Authentication/Authentication.Core/Microsoft.Graph.Authentication.Core.csproj index e3564a114b..cc7741e0f2 100644 --- a/src/Authentication/Authentication.Core/Microsoft.Graph.Authentication.Core.csproj +++ b/src/Authentication/Authentication.Core/Microsoft.Graph.Authentication.Core.csproj @@ -4,7 +4,7 @@ 9.0 netstandard2.0;net6.0;net472 Microsoft.Graph.PowerShell.Authentication.Core - 2.32.0 + 2.35.1 true @@ -13,11 +13,14 @@ true - - + + + + + - + diff --git a/src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs b/src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs index c781788e7e..2c0b2da1be 100644 --- a/src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs +++ b/src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs @@ -78,8 +78,8 @@ private static async Task 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) @@ -138,7 +138,7 @@ private static async Task GetInteractiveBrowserCre { return interactiveBrowserCredential.AuthenticateAsync(new TokenRequestContext(authContext.Scopes), cancellationToken); }); - } + } await WriteAuthRecordAsync(authRecord).ConfigureAwait(false); return interactiveBrowserCredential; } diff --git a/src/Authentication/Authentication.Test/Microsoft.Graph.Authentication.Test.csproj b/src/Authentication/Authentication.Test/Microsoft.Graph.Authentication.Test.csproj index b9919c188d..0c824a9a3d 100644 --- a/src/Authentication/Authentication.Test/Microsoft.Graph.Authentication.Test.csproj +++ b/src/Authentication/Authentication.Test/Microsoft.Graph.Authentication.Test.csproj @@ -2,7 +2,7 @@ net8.0;net472 false - 2.32.0 + 2.35.1 diff --git a/src/Authentication/Authentication/Microsoft.Graph.Authentication.csproj b/src/Authentication/Authentication/Microsoft.Graph.Authentication.csproj index 886acf3770..46c784f4a0 100644 --- a/src/Authentication/Authentication/Microsoft.Graph.Authentication.csproj +++ b/src/Authentication/Authentication/Microsoft.Graph.Authentication.csproj @@ -10,7 +10,7 @@ Microsoft.Graph.Authentication.nuspec © Microsoft Corporation. All rights reserved. - 2.32.0 + 2.35.1 true diff --git a/src/Authentication/Authentication/Microsoft.Graph.Authentication.nuspec b/src/Authentication/Authentication/Microsoft.Graph.Authentication.nuspec index 9ec5bcf473..0fb359f1c2 100644 --- a/src/Authentication/Authentication/Microsoft.Graph.Authentication.nuspec +++ b/src/Authentication/Authentication/Microsoft.Graph.Authentication.nuspec @@ -1,7 +1,7 @@ - 2.32.0 + 2.35.1 Microsoft.Graph.Authentication Microsoft Graph PowerShell authentication module Microsoft @@ -36,9 +36,12 @@ + + + @@ -64,7 +67,6 @@ - diff --git a/src/Authentication/Authentication/ModuleInitializer.cs b/src/Authentication/Authentication/ModuleInitializer.cs index 2290c96abd..e0d597687a 100644 --- a/src/Authentication/Authentication/ModuleInitializer.cs +++ b/src/Authentication/Authentication/ModuleInitializer.cs @@ -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); }