Configure multiple B2C tenants in a Commerce environment
This article describes when and how to set up multiple Microsoft Microsoft Entra business-to-consumer (B2C) tenants per channel for user authentication in a dedicated Dynamics 365 Commerce environment.
Dynamics 365 Commerce uses the Microsoft Entra B2C cloud identity service to support user credentials and authentication flows. Users can use the authentication flows to sign up, sign in, and reset their password. Microsoft Entra B2C stores a user's sensitive authentication information, such as the user name and password. The user record is unique to each B2C tenant, and it uses either user name (email address) credentials or social identity provider credentials.
In most cases, a single Microsoft Entra B2C tenant is used in a Commerce environment. Commerce customers can then create and publish multiple sites in the same Commerce environment, and the same customer credentials will be used across these sites. However, if the sites in the environment should be treated as different brands and appear to users as separate businesses, a B2C tenant can be configured for the channel that is used for the site/brand separation.
Considerations when multiple B2C tenants are set up per channel
Often, when each channel or site is being treated as a separate business, the best option with respect to user authentication flows in Commerce is to use separate legal entities. However, if you want to keep each channel/site in the same environment and legal entity, but want to have separate user authentication for each site, it's important that you consider the following points before you proceed:
Users will have their own distinct credentials for each channel/site.
The same person can have two separate accounts per channel/site, because each account will be a unique entry into a separate B2C tenant.
In the Microsoft Dynamics environment, separate customer records will be returned for global record searches.
If a user uses the same email address across channels/sites, global customer searches will return results for each channel/site. (A channel indicator will be shown.)
The address book can be used to help group users, so that they can be tracked per channel.
The number of customer records per channel might increase, and this increase might affect the performance of global customer searches.
B2C tenants must be carefully mapped to a channel, to help prevent situations where customers sign up for an incorrect tenant. Otherwise, confusion or tracking issues can occur.
The following illustration shows multiple B2C tenants in a Commerce environment.
If you decide that your business requires distinct B2C tenants per channel in the same Commerce environment, complete the procedures in the following sections to request this feature.
Configure B2C tenants in your environment
To configure B2C tenants in your environment, complete the relevant procedures in this section.
Add a Microsoft Entra B2C tenant
To add a Microsoft Entra B2C tenant to your environment, follow these steps.
Sign in to Commerce site builder for your environment as a system admin. To configure Microsoft Entra B2C tenants, you must be a system admin for the Commerce environment.
In the left navigation pane, select Tenant Settings to expand it.
Select B2C Settings, and then select Manage.
Select Add B2C Application, and then enter the following information:
- Application Name: Enter the name that should be used for the application in the context of managing it in Commerce. We recommend that you use the application name that you chose when you set up the Microsoft Entra B2C application in the Azure portal. In this way, you can help reduce confusion when you manage B2C tenants in Commerce.
- Tenant Name: Enter the B2C tenant name as it appears in the Azure portal.
- Forget Password Policy ID: Enter the policy ID (the name of the policy in the Azure portal).
- Signup Signin Policy ID: Enter the policy ID (the name of the policy in the Azure portal).
- Client GUID: Enter the Microsoft Entra B2C tenant ID as it appears in the Azure portal (not the application ID for the B2C tenant).
- Edit Profile Policy ID: Enter the policy ID (the name of the policy in the Azure portal).
When you've finished entering this information, select OK to save your changes. Your new Microsoft Entra B2C tenant should now appear in the list under Manage B2C Applications.
Note
You should leave fields such as Scope, Non Interactive Policy ID, Non Interactive Client ID, Login Custom Domain, and Sign Up Policy ID blank unless the Dynamics 365 Commerce team instructs you to set them.
Manage or delete a Microsoft Entra B2C tenant
- Sign in to Commerce site builder for your environment as a system admin. To configure Microsoft Entra B2C tenants, you must be a system admin for the Commerce environment.
- In the left navigation pane, select Tenant Settings to expand it.
- Select B2C Settings, and then select Manage.
- To edit a B2C tenant, select the pencil symbol next to it. To delete a B2C tenant, select the trash can symbol next to it.
- Select Save, and then select Publish to activate your changes.
Warning
When a B2C tenant is configured for a live/published site, users might have signed up by using accounts that are present on the tenant. If you delete a configured tenant on the Tenant Settings > B2C Tenant menu, you remove the association of that B2C tenant from sites that are associated with any channels of the tenant. In this case, your users might no longer be able to sign in to their accounts. Therefore, use extreme caution when you delete a configured tenant.
When a configured tenant is deleted, the B2C tenant and records will continue to be maintained, but the Commerce system configuration of that tenant will be changed or removed. Users who try to sign up or sign in to the site will create a new account record in the default or newly associated B2C tenant that is configured for the channel of the site.
Configure your channel with a B2C tenant
- Sign in to Commerce site builder for your environment as a system admin. To configure Microsoft Entra B2C tenants, you must be a system admin for the Commerce environment.
- In the left navigation pane, select Site Settings to expand it.
- Select Channels, and then select the channel to configure.
- In the properties pane on the right, in the Select B2C Application field, select the configured Microsoft Entra B2C tenant to use for this channel.
- On the command bar, select Save and Publish to commit the new or updated configuration.
Warning
If you change the B2C application that is assigned to the channel, you remove the current references that have been established for any users who have already signed up in the environment. In this case, any credentials that are associated with the currently assigned B2C application won't be available to users. Therefore, change a channel Microsoft Entra B2C configuration only if you're setting up the channel for the first time, and no users have been able to sign up. Otherwise, users might have to sign up again to establish a record in the new Microsoft Entra B2C tenant.
Additional resources
Deploy a new e-commerce tenant
Associate a Dynamics 365 Commerce site with an online channel
Set up a B2C tenant in Commerce
Set up custom pages for user logins
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for