Azure B2C Custom Policy Framework
Last updated
Last updated
To use Azure B2C with PlaceOS you will need to configure a Custom Policy Framework, using the existing User Flows provided by Azure B2C is not sufficient for use with OAuth2 as it does not provide a User Info endpoint.
Without a User Info endpoint, PlaceOS is unable to correctly create the user record in our users table.
The first step in configuration is to create a custom policy framework and the supporting application registrations.
Microsoft have prepared extensive documentation to complete this process and we recommend following this documentation to complete this step:
To complete this step, you will also require the Custom Policy Provider templates.
or git clone https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack
To allow PlaceOS to obtain your users information from Azure B2C via the Graph API, you will need to modify the custom policy to support a User Info endpoint.
Microsoft have prepared extensive documentation to complete this process and we recommend following this documentation to complete this step:
You may also opt to collect additional data from your users when they sign up to the application, these are referred to as Custom User Attributes.
Custom User Attributes may include additional information such as:
Users phone number
Address
Company
Department
This information will be stored against the user record in the Azure B2C Directory and can be claimed by PlaceOS where required.
By default, the self serve password reset user flow is not enabled.
We have provided an example Custom User Policy that includes:
Local user sign-up/sign-in i.e. using a email address and password.
User Info endpoint enabled.
Custom User Attributes added.
Microsoft have prepared extensive documentation to add Custom User Attributes to your B2C Custom Policy, we recommend following this documentation to complete this step:
You will need to add a custom user sub-journey to your policy to enable self serve password reset facilities, to do this you can follow this guide by Microsoft:
You can our example policies from Github or git clone git@github.com:place-labs/azure-b2c-custom-policy-sample.git