-
In a web application, I am using Azure AD (OpenId Connect protocol) to authenticate users. However for authorization, I would like to use ASP.NET Core Identity, to let the application admins manage users' access in the application level. I was expecting something similar has been done already but so far my searches didn't lead me to any example of this. So, my first question is if anyone can point me to an example or a related document? Second, in order to achieve this I think I need to add a step in Startup pipeline to add the user to cookie. Perhaps by creating a handler for OnTokenValidated event and add the user to the cookie, as it does by ASP.NET Identity, after a successful sign in. Am I on the right track here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I don't have a good sample to point to, but you can treat AAD just like any other external provider for Identity. Look at this Facebook example: |
Beta Was this translation helpful? Give feedback.
I don't have a good sample to point to, but you can treat AAD just like any other external provider for Identity. Look at this Facebook example:
https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/facebook-logins?view=aspnetcore-5.0#configure-facebook-authentication