Forum Discussion
Managing users from Distribution lists
The only way to use "exclude" type of criteria is via Dynamic Distribution groups, where you can adjust the recipient filter accordingly. I wouldn't recommend it though, unless you have a very strict criteria to filter out all those users. Otherwise the filter will quickly become unmanageable.
Thanks,
but I can't find supported property for custom rule. I don't know how to write a condition for membership of existing groups. Only user's or device's supported properties are there :
https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/groups-dynamic-membership
I need something like : user.groupsMembership -eq "employees"
And I'm not sure that it's possible :(
Any hints please ?
- VasilMichevJul 01, 2019MVP
You are looking at the documentation for Dynamic membership for O365 groups, this does not apply to Distribution groups. Instead, you need a Dynamic Distribution group. Here are the properties supported for filtering: https://docs.microsoft.com/en-us/powershell/exchange/exchange-server/recipient-filters/recipientfilter-properties?view=exchange-ps
You can use the Members one to filter out members of another group, but as I mentioned above, this can quickly become messy when you add more conditions.