Sustainsys.Saml2 multi tenant configuration based on domain name of client

95 views Asked by At

I want to configure the Sustainsys.Saml2 multi tenant configuration based on domain name of client application. I have stored the data into sql server database. I have multi domain of front end application and single domain for the backend application. I have multiple saml configurations in azure portal for each client.

I have below code snippet for single configuration.

 public void ConfigureServices(IServiceCollection services)
 {
  ........
  .AddSaml2(options =>
            {
                options.SPOptions.EntityId = new EntityId("entityId");
                options.IdentityProviders.Add(
                  new IdentityProvider(new EntityId("Identity Provider"), options.SPOptions)
                  {
                      MetadataLocation = "Metadata URL"
                      //LoadMetadata = true
                  });

            });
   ...........
 }

I want to get the data from the database and configure the Sam2 for multi tenant based on domain name so user can login with specific domain saml configuration. For example: domain1.com can use one saml configuration and domain2.com can use another saml configuration.

Thanks

0

There are 0 answers