'Add support for AD authentication on a MVC 4 application

I have a big MVC 4 application that uses Form authentication. It has its own user and privileges management using a custom database. Now I need to adapt this application to allow integration with customer AD and allow SSO using their users.

All the guides I found online assume the creation of a brand new project. I tried to add support using Connected Services, but I cannot find AD service (Only Office 365 Services with Microsoft Graph, but that's not the case).

I would like to make it configurable so I can choose to deploy in both in its own legacy user management scenario or the AD integration scenario.

Can anyone point me in the right direction?



Sources

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

Source: Stack Overflow

Solution Source