We want to implement a scenario where the identification of an identity provider is determined by the request URL rather than using a domain hint.
For instance:
If the request URL is https://app-trial.company.com/public/Company1/, it should redirect to "Company1" as the identity provider.
If the request URL is https://app-trial.company.com/public/Company2/, it should redirect to "Company2" as the identity provider.
And so on for different URLs.
The key challenge here is that users may use the same email address across different companies as long as they are accessing the application through different URLs.
The question is: Is this possible to implement in Azure AD B2C, and if so, do we have any sample policies or resources that can help achieve this specific HRD scenario?
Browse sample policies at https://github.com/azure-ad-b2c/samples, unable to find a sample that meets the scenario.
>Solution :
It is not possible to alter the Azure AD B2C endpoint URIs. You are only able to add query parameters and as stated domain_hint would be the correct one to use in this case.
You should be able to achieve rerouting from https://app-trial.company.com/public/company1 to https://yourtenant.domain.com/tenantid/policyid/oauth2/v2.0/authorize?domain_hint=company1 using Azure Front Door