Search code examples
c#asp.netasp.net-mvc-4azure-active-directory.aspxauth

Include Azure AD authentication in legacy “aspx” project


I am searching a way to include authentication using Azure AD in a legacy web project (net framework 4 apsx) but I can’t found any doc or example, only for most recent MVC project, SPAs... Anyone have a reference for me?


Solution

  • You can easily implement authentication using Azure AD in your asp.net web project.

    Steps to follow:

    1. Register an application in Azure AD.
    2. Add target API, and grant consent to select permissions.
    3. Choose your authentication flow for example OAuth 2.0 authorization code flow
    4. Implement the authentication flow as mentioned in the Microsoft document in your project. It is very simple and requires only get and post requests to implement.

    Please let me know if you still have any issues.