Bicep Azure B2C Deployment via Github Actions

69 Views Asked by At

Apparently it's not possible to create an Azure B2C tenant via bicep using a service principal:

https://learn.microsoft.com/en-us/answers/questions/1298957/can-you-create-an-azure-b2c-tenant-with-a-service

How do I obtain the ROPC flow token programmatically for creating a new tenant?

Here's my workflow file:

name: CI

on:
  push:
    branches: ["main"]
  pull_request:
    types: [opened, synchronize]

jobs:
  build:
    name: Deploy infrastructure
    timeout-minutes: 15
    runs-on: ubuntu-latest
    environment: Dev

    steps:
      - name: Check out code
        uses: actions/checkout@v3
        with:
          fetch-depth: 2

        # Checkout code
      - uses: actions/checkout@main

        # Log into Azure
      - uses: azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}


        # Deploy Bicep file
      - name: deploy
        uses: azure/arm-deploy@v1
        with:
          subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
          resourceGroupName: ${{ secrets.AZURE_RG }}
          template: ./.azure/main.bicep
          parameters: ./.azure/parameters/dev.json
          failOnStdErr: false
0

There are 0 best solutions below