Create a Dynamic M365 Group
You cannot use Dynamic SG for SharePoint access for groups. In this case you need to create a M365 Dynamic Group Instead. This is useful for having an ALL users, All Staff so on, once they are onboarded.
- Go to AAD Admin Centre
- Go to Groups > All Groups
- Select New Group
- Change group type to Microsoft 365
- Fill in the details as you wish. Don't worry that the Group Email Address may show as a .onmicrosoft.com address, it will change to the default domain through 365 eventually.
- Click Create and it will take you back to the All Groups page
- Select your group and go to Properties
- Membership Type to Dynamic User then select Add Dynamic Query
- You can find a lot of information on the types of queries you will have to include here: https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership
Common ones are:
All users- user.objectId -ne null this includes Users, Guest Users, Shared Mailboxes and Groups.
All users except guest users (user.objectId -ne null) -and (user.userType -eq "Member")
No Comments