Set up a B2C tenant in Commerce
This article describes how to set up your Azure Active Directory (Azure AD) business-to-consumer (B2C) tenants for user site authentication in Dynamics 365 Commerce.
Dynamics 365 Commerce uses Azure AD B2C to support user credential and authentication flows. A user can sign up, sign in, and reset their password through these flows. Azure AD B2C stores sensitive user authentication information, such as username and password. The user record in the B2C tenant will store either a B2C local account record or a B2C social identity provider record. These B2C records will link back to the customer record in the Commerce environment.
Azure AD B2C will retire old (legacy) user flows by August 1, 2021. Therefore, you should plan to migrate your user flows to the new recommended version. The new version provides feature parity and new features. The module library for Commerce version 10.0.15 or higher should be used with the recommended B2C user flows. For more information, see User flows in Azure Active Directory B2C.
Commerce evaluation environments come with a pre-loaded Azure AD B2C tenant for demonstration purposes. Loading your own Azure AD B2C tenant using the steps below is not required for evaluation environments.
You can further protect your site users and enhance the security of your Azure AD B2C tenants with Azure AD Identity Protection and Conditional Access. To review the capabilities available to Azure AD B2C Premium P1 and Premium P2 tenants, see Identity Protection and Conditional Access for Azure AD B2C.
Dynamics environment prerequisites
Before you begin, ensure that your Dynamics 365 Commerce environment and e-commerce channel are configured appropriately by fulfilling the following prerequisites.
- Set the POS operations AllowAnonymousAccess value to "1" in Commerce headquarters:
- Go to POS Operations.
- In the operations grid, right-click and select Personalize.
- Select Add a field.
- In the list of available columns, select the AllowAnonymousAccess column to add it.
- Select Update.
- For the 612 "Customer add" operation, change AllowAnonymousAccess to "1."
- Run the 1090 (Registers) job.
- Set the number sequence customer account Manual attribute to No in Commerce headquarters:
- Go to Retail and Commerce > Headquarters setup > Parameters > Accounts receivable parameters.
- Select Number sequences.
- In the Customer account row, double-click the Number Sequence Code value.
- On the General FastTab of the number sequence, set Manual to No.
After deployment of your Dynamics 365 Commerce environment, it also is recommended to Initialize seed data in the environment.
To continue the process of setting up a B2C tenant in Commerce, proceed to Create or link to an existing Azure AD B2C tenant in the Azure portal.