skip to Main Content

I am trying to automate the upload of custom policies as I have multiple tenants and each tenant consists of multiple custom policies.
I am interested in either Azure cli or SDK for the same. I searched on Google but could not find anything related.

Anyone work on this kind of automation?

2

Answers


  1. You can do this with Azure Pipelines or you can use the API’s directly.

    Login or Signup to reply.
  2. Local/Manual deployment options:

    1. PowerShell Script again the Trust Framework Policy Graph API, Azure AD PowerShell module, or using the Microsoft.Graph.Beta PowerShell SDKYou would need to handle variable substitution before uploading the policies.

    2. Using VSCode, use the Azure AD B2C Tools extension, which allows adding multiple environments. Variable substitution is handled by the package.

    CI/CD Pipeline:

    1. Azure DevOps pipelineYou would need to handle variable substitution in the pipeline. Azure DevOps pipeline for Azure AD B2C Sample

    2. GitHub Actions pipelineYou would need to handle variable substitution in the pipeline. Github Action for Azure AD B2C using ieftool Sample

    3. IEF Tool npm packageYou would need to handle variable substitution in the pipeline. Sample below for Azure DevOps Pipeline

    - task: NodeTool@0
      displayName: 'Install Node'
      inputs:
        versionSpec: '10.x'
    
    - script: npm install -g ieftool
      displayName: 'Install IEF Tool'
    
    - script: ieftool deploy -t $(TenantId) -c $(DeploymentClientId) -s $(DeploymentClientSecret) -p $(Pipeline.Workspace)/b2c-policies
      displayName: 'Uploading IEF policies'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search