You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/b2b/use-dynamic-groups.md
+41-11Lines changed: 41 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ services: active-directory
6
6
ms.service: active-directory
7
7
ms.subservice: B2B
8
8
ms.topic: conceptual
9
-
ms.date: 12/14/2017
9
+
ms.date: 02/28/2020
10
10
11
11
ms.author: mimart
12
12
author: msmimart
@@ -23,21 +23,51 @@ Dynamic configuration of security group membership for Azure Active Directory (A
23
23
24
24
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).
25
25
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.
29
28
30
-

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:
31
35
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:
34
40
35
-

41
+

36
42
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.
39
44
40
-

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
+

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
+

0 commit comments