Upload Azure AD B2C Custom Policy Via Powershell

Viewed 673
3 Answers

Azure AD B2C now supports PowerShell cmdlets

Azure AD Preview module documentation

See medium blog

Quick Start

Launch Power Shell and try below commands

> Install-Module -Name AzureADPreview 
> Connect-AzureAd -tenantId <yourtenantname> -accountId <yourAlias@contoso.com>
> Get-AzureADMSTrustFrameworkPolicy 
> Get-AzureADMSTrustFrameworkPolicy -Id B2C_1A_signup_signin -OutputFilePath C:\B2C_1A_signup_signin.xml
> New-AzureADMSTrustFrameworkPolicy  -InputFilePath C:\B2C_1A_signup_signin.xml
> Set-AzureADMSTrustFrameworkPolicy  -Id B2C_1A_signup_signin -InputFilePath C:\B2C_1A_signup_signin.xml

You cant.

Well, you used to be able to if you had an advanced policy with the B2C powershell tools but ever since they moved from B2C to Identity Experience Framework they have disabled it.

I presume when they go back to ARM templates then they will re-enable it.

Azure AD B2C currently does not support any programmatic policy management, including Graph, PowerShell or ARM templates.

You can support this ask and keep track of it (i.e. get notified when there's a preview available) for voting for it in the Azure AD B2C feedback forum: Programmatically Manage B2C Policies

Related