Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Azure AD B2C
Azure AD B2C

Azure AD B2C

Manish Tiwari

|
154 installs
| (5) | Free
Automate Azure B2C custom policy build and release
Get it free

Azure AD B2C

There are two task available.

  1. Build AD(B2C) Policies

    it will replace all the environment related configuration and save policies in artifect directory.

  2. Release AD(B2C) Policies

    it will create/update policies and encryption keys in azure

To know more about azure b2c custom policies, please click here.

Sample YAML file is available on github.

Please Visit Microdoft Docs for B2C Setup

Installation and Configuration

1. Register An Application And Give Graph permissions

  1. Go to azure b2c tenant

  2. Register an application in b2c tenant

    • Go to Azure Active Directory in b2c
    • Click on App registrations (Legacy) *1 image
    • Click on New application registration *2
    • Fill the details
      • Name - Name of the application *1
      • Application type - type of the application, select Web app/ API *2
      • Sign-On URL - URL of you application (you can give any url) *3
    • Click on Create button *4 image
  3. Now Click on Settings

    • copy the Application Id for future use image
  4. Permissions

    • Click on Required permissions *1

      • we are using Microsoft Graph API's for creation and updation so for that we need some permissions.
    • Click on Add *2 image

    • Click on Select an API and Select Microsoft Graph image

    • After selecting Microsoft Graph it will ask you for Permissions

      • Give Following Permissions
        • Delegate
          • Read and write your organization's trust framework policies
          • Read your organization's policies
          • Read trust framework key sets
          • Read and write trust framework key sets
        • Application
          • Read and write your organization's trust framework policies
          • Read your organization's policies
          • Read trust framework key sets
          • Read and write trust framework key sets

      Make Sure that Microsoft graph is showing Total 8 Permissions image

    • Click on Done *1

    • Click on Grant permissions *2

      • this is most important step, please make sure this is done image
    • Now we will generate secret/Key

      • Select Keys *1
      • Fill Details *2
        • Key description
        • Duration - please select Never expire
      • save and copy the secret for future use image

    2. Build Task

    1. Create Build Pipeline
    2. Search Build AD(B2C) Policies
    3. Insert Details
      • Policy Directory Path - Path for your policies folder in Repo
      • JSON Values - Json Values
        {
             "Tenant":"B2CTEST",
              "FacebookCliendId":"12121",
              "FacebookSecret":"asa1231"
        }
      • Artifact Publish Path - Artifect publish path (used by next)
    4. Add new task (Publish Artifects)
    5. save and run

    image

    2. Release Task

    1. Create Release Pipeline
    2. Add Artifects (Save artifects path)
    3. Add Task (Search Release AD(B2C) Policies)
    4. Insert Details
      • B2C Domain/ Tenant name - B2c Domain name
      • Application Id - Application Id
      • Application Secret - Application Secret
      • Artifact Publish Path - Path from above task
    5. save and run

    image
    image

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft