Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yuanyms opened this issue Feb 25, 2023 · 4 comments

Comments

@yuanyms
Copy link

yuanyms commented Feb 25, 2023

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~

@dougbu
Copy link
Member

dougbu commented Feb 25, 2023

@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❔

@yuanyms
Copy link
Author

yuanyms commented Feb 25, 2023

@dougbu
Copy link
Member

dougbu commented Feb 25, 2023

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.

@yuanyms
Copy link
Author

yuanyms commented Feb 26, 2023

Thanks~ Will try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants