A cloud-based identity and access management service for securing user authentication and resource access
Hello @N, in order to implement Azure AD authentication with SAML in ASP.NET MVC (.NET Framework) and Sustainsys.Saml2.Mvc you need, as a minimum, to set the following values in your application web.config:
<sustainsys.saml2 entityId="https://localhost:44302/Saml2" returnUrl="https://localhost:44302/" >
<identityProviders>
<add entityId="https://sts.windows.net/22a84c88-253a-4025-a5c4-e0dc365b8d17/" signOnUrl="https://login.microsoftonline.com/22a84c88-253a-4025-a5c4-e0dc365b8d17/saml2" allowUnsolicitedAuthnResponse="true" binding="HttpRedirect" >
<signingCertificate fileName="~/App_Data/sustainsys.cer"/>
</add>
</identityProviders>
</sustainsys.saml2>
Where:
-
sustainsys.saml2.entityIdis your Azure AD enterprise application Identifier (Entity ID) -
sustainsys.saml2.returnUrlis where you want sustainsys to redirect after hitting the AssertionConsumerServiceURL -
identityProviders/add.0/entityIdis your Azure AD enterprise application Azure AD Identifier -
identityProviders/add.0/signOnUrlis your Azure AD enterprise application Login URL -
identityProviders/add.0/signingCertificate.fileNameis the path to your Azure AD enterprise application SAML Certificate (Base64)
In Azure AD you should create an enteprise application with the following information:
-
Identifier (Entity ID):https://localhost:44302/Saml2 -
Reply URL (Assertion Consumer Service URL):https://localhost:44302/Saml2/acs
For more information take a look to Single sign-on SAML protocol , <sustainsys.saml2> Element and the following sample: https://github.com/Sustainsys/Saml2/tree/v2/Samples/SampleMvcApplication.
Regarding MFA it's not configured in the application but in Azure AD. Take a look to Turn on multi-factor authentication.
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.