User.Identity.Name is empty .Net Core 6.0 SAML SSO

114 views Asked by At

First of all, I know similar questions have been posted here before but hear me out. After all the posted solutions failed for me I am posting this. So the scenario is as follows: I have SAML integration in my ASP.Net Core 6.0 MVC Web Application. After authentication with the Service Provider, I am calling HttpContext.SignInAsync. I expect the name of the authenticated user (In my case the official email Id) to be returned. But I am getting an empty string. On IIS I have Anonymous and Windows Authentication set to true. When I disable Anonymous authentication as suggested in other solutions I can no longer reach the Controller that triggers SSO. And the browser starts prompting for Windows Credentials. Do let me know if more details are required I will share all that I can.

0

There are 0 answers