Steps to Configure the ASP.NET SAML 2.0 Module
Step 1: Download and extract package.
- Download the ASP.NET Core SSO SAML 2.0 Middleware.
- For setting up the module, extract the asp-net-core-saml-middleware-xxx.zip, you will find a DLL file miniorange-saml-sso.dll
Step 2: Installation of ASP.NET Core SSO Middleware
- Add the reference miniorange-saml-sso.dll file in your application.
- Add the following dependencies using nuget in your application:
- In the Startup.cs file
I. Add the namespace miniOrange.saml
II. Add the following code snippet in the Startup.ConfigureServices method for using session services
III. Add the following code snippet lines in Startup.Configure method
- Run the application on the server. On successful application run, SAML SP metadata will be automatically generated in the configuration file.
Step 3: Configure your Identity Provider
- To configure your identity provider you will be required with SP metedata(SP Entity ID, ACS URL).
- You can get the SAML SP metadata under the miniorange section in appsettings.json file
- Copy the SP metadata like SP Entity ID, ACS URL, and provide it to your identity provider for configuration.
Step 4: Configure your Service Provider
- After configuring the identity provider it will provide you with IDP Entity ID, IDP Single Sign-On URL and x.509 Certificate.
- Configure these values against idpentityid, idpssourl, and idpcert fields under the miniorange section in appsettings.json file configuration file.
Step 5: SSO Link
- Use the following URL as a link in your application from where you want to perform SSO:
- For example you can use it as:
<a href="https://<your-application-base-url>/?ssoaction=login”>Log in</a>"
Step 6: Code snippet to verify SSO
string name, claimtype, claimvalue;
name = User.Identity.Name;
foreach(var claim in User.Claims)
claimtype = claim.Type;
claimvalue = claim.Value;
You can configure the ASP.NET SAML 2.0 Single Sign-On (SSO) module with any Identity Provider such as ADFS, Azure AD, Bitium, Centrify, G Suite, JBoss Keycloak, Okta, OneLogin, Salesforce, AWS Cognito, OpenAM, Oracle, PingFederate, PingOne, RSA SecureID, Shibboleth-2, Shibboleth-3, SimpleSAML, WSO2 or even with your own custom identity provider and secure your ASP.NET / ASP.NET MVC / ASP.NET Core / VB.NET applications by performing Single Sign-on (SSO) into them.
Not able to find your IdP? Contact us at email@example.com and we'll help you set up SSO with your IdP in no time.
The miniOrange ASP.NET SAML 2.0 Connector supports C# and Visual Basic
We also provide DotNet Nuke Single Sign-On SAML Connector. Click Here to know more.
miniOrange also provides you modules for integration with legacy apps such as Active Directory, SiteMinder, Radius, Unix and so on.
miniOrange helps you for adding login/authentication into your ASP.NET site using OAuth, OpenID, ADFS, SAML and WSFED protocols.
Have questions or need clarifications? Please contact us at firstname.lastname@example.org
and our experts will be there to help you.