Skip to content

Commit 234fed3

Browse files
Merge pull request #106087 from msmimart/mm-dynamicgroups
[B2B] Update dynamic groups to match UI
2 parents 2984c85 + 993fcab commit 234fed3

File tree

7 files changed

+41
-11
lines changed

7 files changed

+41
-11
lines changed
29.2 KB
Loading
25.2 KB
Loading
32.7 KB
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.

articles/active-directory/b2b/use-dynamic-groups.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: active-directory
66
ms.service: active-directory
77
ms.subservice: B2B
88
ms.topic: conceptual
9-
ms.date: 12/14/2017
9+
ms.date: 02/28/2020
1010

1111
ms.author: mimart
1212
author: msmimart
@@ -23,21 +23,51 @@ Dynamic configuration of security group membership for Azure Active Directory (A
2323

2424
The appropriate [Azure AD Premium P1 or P2 licensing](https://azure.microsoft.com/pricing/details/active-directory/) is required to create and use dynamic groups. Learn more in the article [Create attribute-based rules for dynamic group membership in Azure Active Directory](../users-groups-roles/groups-dynamic-membership.md).
2525

26-
## What are the built-in dynamic groups?
27-
The **All users** dynamic group enables tenant admins to create a group containing all users in the tenant with a single click. By default, the **All users** group includes all users in the directory, including Members and Guests.
28-
Within the new Azure Active Directory admin portal, you can choose to enable the **All users** group in the Group Settings view.
26+
## Creating an "all users" dynamic group
27+
You can create a group containing all users within a tenant using a membership rule. When users are added or removed from the tenant in the future, the group's membership is adjusted automatically.
2928

30-
![Shows enable the All Users group set to Yes](media/use-dynamic-groups/enable-all-users-group.png)
29+
1. Sign in to the [Azure portal](https://portal.azure.com) with an account that is assigned the Global administrator or User administrator role in the tenant.
30+
1. Select **Azure Active Directory**.
31+
2. Under **Manage**, select **Groups**, and then select **New group**.
32+
1. On the **New Group** page, under **Group type**, select **Security**. Enter a **Group name** and **Group description** for the new group.
33+
2. Under **Membership type**, select **Dynamic User**, and then select **Add dynamic query**.
34+
4. Above the **Rule syntax** text box, select **Edit**. On the **Edit rule syntax** page, type the following expression in the text box:
3135

32-
## Hardening the All users dynamic group
33-
By default, the **All users** group contains your B2B collaboration (guest) users as well. You can further secure your **All users** group by using a rule to remove guest users. The following illustration shows the **All users** group modified to exclude guests.
36+
```
37+
user.objectId -ne null
38+
```
39+
1. Select **OK**. The rule appears in the Rule syntax box:
3440

35-
![Shows rule where user type not equals guest](media/use-dynamic-groups/exclude-guest-users.png)
41+
![Rule syntax for all users dynamic group](media/use-dynamic-groups/all-user-rule-syntax.png)
3642

37-
You might also find it useful to create a new dynamic group that contains only guest users, so that you can apply policies (such as Azure AD Conditional Access policies) to them.
38-
What such a group might look like:
43+
1. Select **Save**. The new dynamic group will now include B2B guest users as well as member users.
3944

40-
![Shows rule where user type equals guest](media/use-dynamic-groups/only-guest-users.png)
45+
46+
1. Select **Create** on the **New group** page to create the group.
47+
48+
## Creating a group of members only
49+
50+
If you want your group to exclude guest users and include only members of your tenant, create a dynamic group as described above, but in the **Rule syntax** box, enter the following expression:
51+
52+
```
53+
(user.objectId -ne null) and (user.userType -eq "Member")
54+
```
55+
56+
The following image shows the rule syntax for a dynamic group modified to include members only and exclude guests.
57+
58+
![Shows rule where user type equals member](media/use-dynamic-groups/all-member-user-rule-syntax.png)
59+
60+
## Creating a group of guests only
61+
62+
You might also find it useful to create a new dynamic group that contains only guest users, so that you can apply policies (such as Azure AD Conditional Access policies) to them. Create a dynamic group as described above, but in the **Rule syntax** box, enter the following expression:
63+
64+
```
65+
(user.objectId -ne null) and (user.userType -eq "Guest")
66+
```
67+
68+
The following image shows the rule syntax for a dynamic group modified to include guests only and exclude member users.
69+
70+
![Shows rule where user type equals guest](media/use-dynamic-groups/all-guest-user-rule-syntax.png)
4171

4272
## Next steps
4373

0 commit comments

Comments
 (0)