This is a fork of the azure-ad-b2c/deploy-trustframework-policy repository to convert it into a PowerShell-based composite action to account for better error handling.
Use this GitHub Action to deploy an Azure AD B2C custom 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, see Deploy Azure AD B2C custom policy with GitHub actions.
git clone https://github.com/Andrews-McMeel-Universal/deploy-trustframework-policy
Variable | Description | Required | [Default] |
---|---|---|---|
folder |
The folder where the custom policies files are stored | x | N/A |
files |
Comma delimiter list of policy files | x | N/A |
tenant |
The full Azure AD B2C tenant name (for example, contoso.onmicrosoft.com) or GUID | x | N/A |
clientId |
The application Client ID for a service principal which will be used to authenticate to the Microsoft Graph | x | N/A |
clientSecret |
The application Secret for a service principal which will be used to authenticate to the Microsoft Graph | x | N/A |
renumberSteps |
Renumber the orchestration steps. Possible values: true, or false | false |
|
addAppInsightsStep |
Add App Insights orchestration steps to the the user journeys. | false |
|
verbose |
Log level verbose. | false |
on: push
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Upload TrustFrameworkBase Policy
uses: azure-ad-b2c/deploy-trustframework-policy@v5
with:
folder: "./Policies"
files: "TrustFrameworkBase.xml,TrustFrameworkExtensions.xml,SignUpOrSignin.xml"
tenant: my-tenant.onmicrosoft.com
clientId: 00000000-0000-0000-0000-000000000000
clientSecret: ${{ secrets.clientSecret }}
renumberSteps: false
Once a pull request is merged into main, you can create a new release to use it as a reusable workflow. To create a new release, follow the instructions in this guide: Creating a Release
Once you've created a new release, you can use the Update Major Release Workflow to automatically update the major release tag for the repository.
- Navigate to the Update Major Release workflow.
- Press "Run workflow" on the right-hand side of the page.
- Specify the tag to create a major release for and what the major release will be.
- Click "Run workflow"