Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
code

GitHub Action

Deploy Azure AD B2C custom policy

v1

Deploy Azure AD B2C custom policy

code

Deploy Azure AD B2C custom policy

A GitHub Action for deploying Azure AD B2C policies using the Microsoft Graph API

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Deploy Azure AD B2C custom policy

uses: azure-ad-b2c/deploy-trustframework-policy@v1

Learn more about this action in azure-ad-b2c/deploy-trustframework-policy

Choose a version

GitHub Action for deploying TrustFramework policies

Use this GitHub Action to deploy a TrustFramework Policy into your Azure Active Directory B2C tenant using the Microsoft Graph API. If the policy does not yet exist, it will be created. If the policy already exists, it will be replaced.

For more information on TrustFramework Policies and the Identity Experience Framework, see the Azure AD B2C documentation.

To authenticate to the Microsoft Graph, you will need to obtain client application credentials using these instructions.

Sample workflow to deploy TrustFramework policies

on: push

env:
  clientId: 00000000-0000-0000-0000-000000000000
  tenant: my-tenant.onmicrosoft.com

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: 'Upload TrustFrameworkBase Policy'
      uses: azure-ad-b2c/deploy-trustframework-policy@v1
      with:
        file: "./Policies/TrustFrameworkBase.xml"
        policy: B2C_1A_TrustFrameworkBase
        tenant: ${{ env.tenant }}
        clientId: ${{ env.clientId }}
        clientSecret: ${{ secrets.clientSecret }}

    - name: Upload TrustFrameworkExtensions Policy
      uses: azure-ad-b2c/deploy-trustframework-policy@v1
      with:
        file: "./Policies/TrustFrameworkExtensions.xml"
        policy: B2C_1A_TrustFrameworkExtensions
        tenant: ${{ env.tenant }}
        clientId: ${{ env.clientId }}
        clientSecret: ${{ secrets.clientSecret }}

    - name: Upload SignUpOrSignin Policy
      uses: azure-ad-b2c/deploy-trustframework-policy@v1
      with:
        file: "./Policies/SignUpOrSignin.xml"
        policy: B2C_1A_SignUpOrSignin
        tenant: ${{ env.tenant }}
        clientId: ${{ env.clientId }}
        clientSecret: ${{ secrets.clientSecret }}

Community Help and Support

Use Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [azure-ad-b2c].

If you find a bug in the sample, please raise the issue on GitHub Issues.

To provide product feedback, visit the Azure AD B2C feedback page.