aspnet / AspNetWebStack

ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IAuthenticationFilter::OnAuthentication not called when migrating from ADAL to MSAL

yuanyms opened this issue · comments

Hi,

We own web APIs protected by [System.Web.Mvc.Authorize] attribute. We implement IAuthenticationFilter::OnAuthentication that looks into AuthenticationContext..HttpContext.User.Identity.IsAuthenticated and AuthenticationType, etc.

Our client was using ADAL to authenticate and call the API. The filter above is working as expected. When our client migrated to MSAL, the filter is not called any more, but go to API directly. Put bp inside the API and confirm HttpContext has correct user identity etc.
I saw another post that seems having the same isseu.

Is this the right place to ask this question? Please let me know what else information I can provide.

FYI, The MVC package version is 5.2.3 right now.

Thanks~

@blowdart, @HaoK I'm not sure how to spell ADAL or MSAL😉 Any quick thoughts❔

I saw another post that seems having the same isseu.

@yuanyms do you have a pointer to the other post❔

If your first link is related and you're using Owin, #119 may contain the fix. That was part of the 5.2.5 release. Please try updating to that version or the current one, 5.2.9 (better because it's in support) @yuanyms.

Thanks~ Will try it out.