If you want to avoid manually adding individuals to the Defend user group in Microsoft 365, groups can be added instead.
To do this, follow the steps below:
- Log in to Entra ID.
- Navigate to Identity > Groups > All groups > New groups.
- Under group type, select Microsoft 365.
- Under Membership Type, select Dynamic User.
- Select an Owner for the group.
- Select Add dynamic query.
- Click Edit next to the Rule syntax box and paste in the expression below. Replace GroupObjectID with the objectID of the group to be added.
Note: If the group being added has nested groups, the users within the group will not be added.
Rule syntax:
user.memberof -any (group.objectId -in ["GroupObjectID1", "GroupObjectID2"])