Configure an ASP.NET Core 8 application to work with ADFS 2022

Let's create an ASP.NET Core 8 app to use Active Directory Federation Services for authentication and authorization. The .NET code will use OAuth 2.0 and OpenID Connect to communicate with ADFS, and we'll create an ADFS application group for the configuration. Start by opening up Visual Studio 2022 and creating a new project. You can use the free community edition to do this. For the project type, choose ASP.NET Core Web App (Razor Pages) Give your project a name On the Additional Information screen, leave the Framework as .NET 8.0. And leave the Authentication type as "None". We're going to…
Read More

Windows Authentication Not Working with ADFS 2022

When testing out Windows Authentication with a new ADFS deployment for Windows Server 2022, I found that users kept getting redirected to the Forms Authentication login page. Windows Authentication was definitely enabled as a Primary Authentication method in ADFS manager for Intranet authentication. Windows Integrated Authentication is supposed to take predecence over Forms Based Authentication (FBA) when the computer is joined to the domain, and therefore able to obtain a Kerberos ticket in the background. Going through the basic troubleshooting didn't yeild any results - the SPN for the ADFS service account was configured properly, the channel binding token wasn't…
Read More