Need to create same App Registration for Parent tenant and Nested B2C tenant

ShashankSaxena-2458 131 Reputation points
2023-05-03T05:59:53.6266667+00:00

Hello All,

I'm dealing with some odd challenges because we have three tenants: 1. ABC.com 2. abc.onmicrosoft.com (a subdomain of ABC.com) 3. B2C tenant (established under abc.msn.com). We have a requirement where we need to configure one App Registration on both sides on 1 & 3 where the application access URL is the same (as per the requirement) and when users from Tenant 1 access the URL, they are redirected to Tenant 1 for authentication and when B2C users from Tenant 2 access the same URL, they are redirected to Tenant 3 for authentication. Is that demand feasible, and if so, how?

Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.
148 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,920 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,163 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Akshay-MSFT 17,871 Reputation points Microsoft Employee
    2023-05-04T08:47:36.4733333+00:00

    @Anonymous

    Thanks for posting your query on Microsoft Q&A. From above description I could understand that you need to configured 2 application with same URL, where users from Tenant T1 should be able to access data from application hosted in Tenant T1.

    And users from tenant T2 should be able to access application hosted on B2C tenant T3.

    Please do let me know in the comments if this is not correct, else try following below suggestion:

    • Create an application in T1 with

    Accounts in this organizational directory only (T1 only - Single tenant) in Supported account types

    User's image

    1. Here while Configuring Azure AD as an identity provider select directory name of T2 (abc.onmicrosoft.com) to replace tenant below:

    https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration

    If you have 1 application hosted in B2C tenant, then

    • You need to integrate AAD of Tenant 1 with B2C as an IDP, this would allow users from T1 to authenticate with T3 B2C tenant as federated users.
    • Similarly you must allow local account signup. This would be used by users from T2 to register as local user, in this case all the authentication would be taken care by Azure AD B2C tenant T3.

    The users will be registered as consumer accounts( local and federated B2C accounts), none of the above steps would create guest accounts in B2C tenant.

    A local account refers to an account that is created in your Azure AD B2C directory when a user signs up for your application or an admin creates the account. Usernames and passwords are stored locally and Azure AD B2C serves as the identity provider for local accounts.

    Federated sign-in

    You can configure Azure AD B2C to allow users to sign in to your application with credentials from external social or enterprise identity providers (IdPs). Azure AD B2C supports many external identity providers and any identity provider that supports OAuth 1.0, OAuth 2.0, OpenID Connect, and SAML protocols.

    With external identity provider federation, you can offer your consumers the ability to sign in with their existing social or enterprise accounts, without having to create a new account just for your application.

    On the sign-up or sign-in page, Azure AD B2C presents a list of external identity providers the user can choose for sign-in. Once they select one of the external identity providers, they're redirected to the selected provider's website to complete the sign-in process. After the user successfully signs in, they're returned to Azure AD B2C for authentication of the account in your application.

    User's image

    Please do let me know if you have any further queries.

    Thanks,

    Akshay Kaushik

    Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.

    1 person found this answer helpful.

  2. ShashankSaxena-2458 131 Reputation points
    2023-05-18T07:37:32.68+00:00

    sorry @Akshay-MSFT for the delayed response, actually I was on vacation. but the given solution didn't work, but he managed somehow. we have created Multi tenant application on Primary tenant side and created APplication for User Flow in Azure AD B2C and asked our Developer to make the changes in their code and fortunately it worked. so thanks for the response. Appreciate your support

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.