Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload Azure AD B2C Custom Policy Via Powershell

Tags:

azure-ad-b2c

How can I upload custom policies via power shell?

like image 223
spottedmahn Avatar asked Dec 31 '25 17:12

spottedmahn


1 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 <[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
like image 135
Abhishek Agrawal Avatar answered Jan 03 '26 07:01

Abhishek Agrawal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!