'Authenticate using active directory in asp.net without login form

I have to create a web application for an organization, I was told to authenticate users from Active directory i.e users should be directly prompted to Home page. Please help, i just starting out in asp net. Thank you.



Solution 1:[1]

Without login page you'll never have the user's auth token, so authentication is useless in this case, but if you need to use app auth for graph or other services you have to use the application registration's tenantId, appId and a client secret, in the app registration you should have set all the permissions you need, and that's it.

Solution 2:[2]

Windows IIS , support built-in Active directory Authentication ( SSO , NTLM Authentication) for asp.net application.

In short, you do not need write code but just require make sure your hosted asp website use below setting and it will do the work. enter image description here

I never customize access deny redirection ( HTTP 403) handler, but I assume you can easily make that custimization using this screen. enter image description here

FYI, IIS server is a web server\microsoft technology that allow you host web application. Check this youtube how to up your IIS server

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kvble
Solution 2 HO LI Pin