/B2CPipeline

Use Azure pipelines to deploy B2C custom journeys

MIT LicenseMIT

Deploy B2C custom journeys using Azure pipelines

Using Azure pipelines to deploy B2C custom journeys. There is an alternative approach documented here. The advantages of the approach provided below are:

  1. Simpler PowerShell script (3 lines)
  2. No need to enforce sequence of uploading to make sure base policies are uploaded before their dependencies. Script does that enforcement.
  3. No need to update policies with correct tenant name or IEF application ids. It is done automatically by the script.

The script uses the IefPolicies PowerShell module.

Process

  1. Create a Git project
  2. Add your custom journeys to the policies sub-folder (or use New-IefPolicies to create these from the Starter Pack)
  3. Edit the policies/conf.json file to set policy prefix and any other variables that ought to be replaced in the policies
  4. Create an Azure pipeline and reference your Git repo in it
  5. Update the yaml file with the one used in this project
  6. Register an application in your B2C tenant (using the AAD tab), which can use client credentials (id/secret or certificate) to update your tenant. It needs to have application Graph permissions as specified here. If you are planning to deploy your policies to multiple tenants (e.g. dev, qa, prod), you may want to create just one app registration, mark it as multi-tenant and consent it to the other tenants.
  7. Add variables to your pipeline with the clientId, clientSecret of the above application and the tenantName (.onmicrosoft.com is not needed)
  8. Run the pipeline