Skip to content

Latest commit

 

History

History
111 lines (77 loc) · 7.59 KB

groups-create-rule.md

File metadata and controls

111 lines (77 loc) · 7.59 KB
title description services documentationcenter author manager ms.service ms.subservice ms.workload ms.topic ms.date ms.author ms.reviewer ms.custom ms.collection
Create or edit a dynamic group and get status - Azure AD | Microsoft Docs
How to create or update a group membership rule in the Azure portal, and check its processing status.
active-directory
curtand
daveba
active-directory
enterprise-users
identity
how-to
12/02/2020
curtand
krbain
it-pro
M365-identity-device-management

Create or update a dynamic group in Azure Active Directory

In Azure Active Directory (Azure AD), you can use rules to determine group membership based on user or device properties. This article tells how to set up a rule for a dynamic group in the Azure portal. Dynamic membership is supported for security groups or Microsoft 365 Groups. When a group membership rule is applied, user and device attributes are evaluated for matches with the membership rule. When an attribute changes for a user or device, all dynamic group rules in the organization are processed for membership changes. Users and devices are added or removed if they meet the conditions for a group. Security groups can be used for either devices or users, but Microsoft 365 Groups can be only user groups. Using Dynamic groups requires Azure AD premium P1 license. See Dynamic membership rules for groups for more details.

Rule builder in the Azure portal

Azure AD provides a rule builder to create and update your important rules more quickly. The rule builder supports the construction up to five expressions. The rule builder makes it easier to form a rule with a few simple expressions, however, it can't be used to reproduce every rule. If the rule builder doesn't support the rule you want to create, you can use the text box.

Here are some examples of advanced rules or syntax for which we recommend that you construct using the text box:

Note

The rule builder might not be able to display some rules constructed in the text box. You might see a message when the rule builder is not able to display the rule. The rule builder doesn't change the supported syntax, validation, or processing of dynamic group rules in any way.

Screenshot that shows the "Dynamic membership rules" page with the "Add expression" action on the "Configure rules" tab selected.

For examples of syntax, supported properties, operators, and values for a membership rule, see Dynamic membership rules for groups in Azure Active Directory.

To create a group membership rule

  1. Sign in to the Azure AD admin center with an account that is in the Global administrator, Intune administrator, or User administrator role in the Azure AD organization.

  2. Search for and select Groups.

  3. Select All groups, and select New group.

    Select the command to add new group

  4. On the Group page, enter a name and description for the new group. Select a Membership type for either users or devices, and then select Add dynamic query. The rule builder supports up to five expressions. To add more than five expressions, you must use the text box.

    Screenshot that shows the "All groups" page with the "New group" action selected.

  5. To see the custom extension properties available for your membership query:

    1. Select Get custom extension properties
    2. Enter the application ID, and then select Refresh properties.
  6. After creating the rule, select Save.

  7. Select Create on the New group page to create the group.

If the rule you entered isn't valid, an explanation of why the rule couldn't be processed is displayed in an Azure notification in the portal. Read it carefully to understand how to fix the rule.

To update an existing rule

  1. Sign in to the Azure AD admin center with an account that is in the Global administrator, Group administrator, Intune administrator, or User administrator role in the Azure AD organization.

  2. Select Groups > All groups.

  3. Select a group to open its profile.

  4. On the profile page for the group, select Dynamic membership rules. The rule builder supports up to five expressions. To add more than five expressions, you must use the text box.

    Add membership rule for a dynamic group

  5. To see the custom extension properties available for your membership rule:

    1. Select Get custom extension properties
    2. Enter the application ID, and then select Refresh properties.
  6. After updating the rule, select Save.

Turn on or off welcome email

When a new Microsoft 365 group is created, a welcome email notification is sent the users who are added to the group. Later, if any attributes of a user or device change, all dynamic group rules in the organization are processed for membership changes. Users who are added then also receive the welcome notification. You can turn off this behavior in Exchange PowerShell.

Check processing status for a rule

You can see the membership processing status and the last updated date on the Overview page for the group.

display of dynamic group status

The following status messages can be shown for Membership processing status:

  • Evaluating: The group change has been received and the updates are being evaluated.
  • Processing: Updates are being processed.
  • Update complete: Processing has completed and all applicable updates have been made.
  • Processing error: Processing couldn't be completed because of an error evaluating the membership rule.
  • Update paused: Dynamic membership rule updates have been paused by the administrator. MembershipRuleProcessingState is set to “Paused”.

The following status messages can be shown for Membership last updated status:

  • <Date and time>: The last time the membership was updated.
  • In Progress: Updates are currently in progress.
  • Unknown: The last update time can't be retrieved. The group might be new.

If an error occurs while processing the membership rule for a specific group, an alert is shown on the top of the Overview page for the group. If no pending dynamic membership updates can be processed for all the groups within the organization for more than 24 hours, an alert is shown on the top of All groups.

processing error message alerts

These articles provide additional information on groups in Azure Active Directory.