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
You can do this with Azure Pipelines or you can use the API’s directly.
Local/Manual deployment options:
PowerShell Script again the Trust Framework Policy Graph API, Azure AD PowerShell module, or using the Microsoft.Graph.Beta PowerShell SDK – You would need to handle variable substitution before uploading the policies.
Using VSCode, use the Azure AD B2C Tools extension, which allows adding multiple environments. Variable substitution is handled by the package.
CI/CD Pipeline:
Azure DevOps pipeline – You would need to handle variable substitution in the pipeline. Azure DevOps pipeline for Azure AD B2C Sample
GitHub Actions pipeline – You would need to handle variable substitution in the pipeline. Github Action for Azure AD B2C using ieftool Sample
IEF Tool npm package – You would need to handle variable substitution in the pipeline. Sample below for Azure DevOps Pipeline