David Evans

David Evans

  • NA
  • 18
  • 944

Add claims to identity in ASP.NET MVC 5 w 3rd party auth

Sep 7 2017 2:01 PM
Hi,
I'm developing a web app with ASP.NET MVC 5 where I use 3rd party authentication through SharePoint. What I would like to do is add claims (roles) to the identity object after the user logs in through sharepoint. Right now I'm getting the user's email from the User.Identity.Name and querying the database to find the user's role, but I would prefer to add it to the authentication cookie. Can this be done?
Thanks
David