Set-AzureADMSConditionalAccessPolicy

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

Syntax

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 6b5e999b-0ba8-4186-a106-e0296c1c4358 -DisplayName "MFA policy 1" -State "Enabled"

          Id                      : 6b5e999b-0ba8-4186-a106-e0296c1c4358
          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.

Type:ConditionalAccessConditionSet
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GrantControls

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

Type:ConditionalAccessGrantControls
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

{{ Fill Id Description }}

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PolicyId

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SessionControls

{{ Fill SessionControls Description }}

Type:ConditionalAccessSessionControls
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-State

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Notes

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