< Back

New-AADB2CPolicy

Fri Jan 10, 2020 5:35 pm

NAME New-AADB2CPolicy



SYNOPSIS

Creates a B2C policy.





SYNTAX

New-AADB2CPolicy [-ClientId] <String> [-ClientSecret] <String> [-TenantId] <String> -FilePath <String> [-Overwrite

<Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]



New-AADB2CPolicy [-ClientId] <String> [-ClientSecret] <String> [-TenantId] <String> -Policy <String> [-Overwrite

<Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

The New-AADB2CPolicy cmdlet creates an Azure Active Directory B2C policy.





PARAMETERS

-ClientId <String>

Specify the client ID you which to use.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ClientSecret <String>

Specify the Client Secret you which to use.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TenantId <String>

Specify the Azure AD B2C tenant ID.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Policy <String>

Specifies a XML policy.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FilePath <String>

Specifies a path to a file.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Overwrite <Boolean>



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>New-AADB2CPolicy -ClientId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ClientSecret xxxxxxxxxxxxxxxxxxx -TenantId

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -Policy <string>



This command creates a policy from a string in your Azure AD B2C tenant









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>New-AADB2CPolicy -ClientId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ClientSecret xxxxxxxxxxxxxxxxxxx -TenantId

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -FilePath <path>



This command creates a policy from a file in your Azure AD B2C tenant









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>New-AADB2CPolicy -ClientId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ClientSecret xxxxxxxxxxxxxxxxxxx -TenantId

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -FilePath <path> -Overwrite $True



This command creates a policy from a file in your Azure AD B2C tenant, using the -overwrite $true will overwrite

any exisitng policy.











RELATED LINKS

Get-AADB2CPolicy

Remove-AADB2CPolicy