From fdf7bdc348e397be38a0be1a57fbb75818d961da Mon Sep 17 00:00:00 2001 From: Trevor Davis Date: Fri, 30 Jul 2021 16:02:44 -0400 Subject: [PATCH] Fixes an issue where the key is not found in the dictionary when calling WithScopes(), WithAppOnly() --- .../BaseRequestExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Identity.Web.MicrosoftGraph/BaseRequestExtensions.cs b/src/Microsoft.Identity.Web.MicrosoftGraph/BaseRequestExtensions.cs index 28e7c67b3..36cfae7f1 100644 --- a/src/Microsoft.Identity.Web.MicrosoftGraph/BaseRequestExtensions.cs +++ b/src/Microsoft.Identity.Web.MicrosoftGraph/BaseRequestExtensions.cs @@ -55,7 +55,7 @@ public static T WithAuthenticationScheme(this T baseRequest, string authentic private static T SetParameter(T baseRequest, Action action) where T : IBaseRequest { - string authHandlerOptionKey = typeof(AuthenticationHandlerOption).ToString(); + string authHandlerOptionKey = typeof(AuthenticationHandlerOption).Name; AuthenticationHandlerOption authHandlerOptions = baseRequest.MiddlewareOptions[authHandlerOptionKey] as AuthenticationHandlerOption ?? new AuthenticationHandlerOption(); TokenAcquisitionAuthenticationProviderOption msalAuthProviderOption = authHandlerOptions?.AuthenticationProviderOption as TokenAcquisitionAuthenticationProviderOption ?? new TokenAcquisitionAuthenticationProviderOption();