Edit

Share via


Set-AzureADMSConditionalAccessPolicy

Updates a conditional access policy in Azure Active Directory by Id.

Syntax

Default (Default)

Set-AzureADMSConditionalAccessPolicy
    -PolicyId <String>
    [-Id <String>]
    [-DisplayName <String>]
    [-State <String>]
    [-Conditions <ConditionalAccessConditionSet>]
    [-GrantControls <ConditionalAccessGrantControls>]
    [-SessionControls <ConditionalAccessSessionControls>]
    [<CommonParameters>]

Description

This cmdlet allows an admin to update a conditional access policy in Azure Active Directory by Id. Conditional access policies are custom rules that define an access scenario.

Examples

Example 1: Updates a conditional access policy in Azure AD by PolicyId.

PS C:\> Set-AzureADMSConditionalAccessPolicy -PolicyId 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 -DisplayName "MFA policy 1" -State "Enabled"

          Id                      : 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5
          DisplayName             : MFA policy 1
          CreatedDateTime         : 2019-09-26T23:12:16.0792706Z
          ModifiedDateTime        : 2019-09-27T00:12:12.5986473Z
          State                   : Enabled

This command updates a new conditional access policy in Azure AD.

Parameters

-Conditions

Specifies the conditions for the conditional access policy in Azure Active Directory.

Parameter properties

Type:ConditionalAccessConditionSet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

Specifies the display name of a conditional access policy in Azure Active Directory.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GrantControls

Specifies the controls for the conditional access policy in Azure Active Directory.

Parameter properties

Type:ConditionalAccessGrantControls
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

{{ Fill Id Description }}

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PolicyId

Specifies the policy id of a conditional access policy in Azure Active Directory.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-SessionControls

{{ Fill SessionControls Description }}

Parameter properties

Type:ConditionalAccessSessionControls
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-State

Specifies the enabled or disabled state of the conditional access policy in Azure Active Directory.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Notes

See the migration guide for Set-AzureADMSConditionalAccessPolicy to the Microsoft Graph PowerShell.