azure active directory – Multi-tenant SaaS app with auth based on hostname (url)

I am trying to build a multi-tenant SaaS app which would have URLs of the following form for tenants A and B:

For any tenant, the options for authentication could be just email (for that tenant domain), or SSO (SAML / OIDC / AAD / Google etc.).

I’m trying to wrap my head around how I could achieve the above using Azure AD B2C and have
the following questions:

  • Is AAD B2C the right product? I feel it is, since it allows integrating with external IdPs, but not 100% sure since there’s a really similar product called Entra External ID now.
  • Is it possible to write a custom policy that chooses the authentication mechanism from the URL? That is tenantA can be Google Auth, vs tenantB can be AAD and tenantC can be Generic SAML

Any pointers would be great. If AD B2C is not the right way, what’s the easiest I can do in .NET/C# to authenticate B2B customers via SSO?

Read more here: Source link