spottedmahn
spottedmahn

Reputation: 16001

Upload Azure AD B2C Custom Policy Via Powershell

How can I upload custom policies via power shell?

Upvotes: 3

Views: 856

Answers (3)

Abhishek Agrawal
Abhishek Agrawal

Reputation: 2287

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 <[email protected]>
> 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

Upvotes: 2

Saca
Saca

Reputation: 10656

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

Upvotes: 1

whatisthejava
whatisthejava

Reputation: 503

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.

Upvotes: 1

Related Questions