Forum Discussion
peteru27
Apr 16, 2021Copper Contributor
Dynamic distribution group with custom attributes
Hi, we have a hybrid environment on Office 365 and we have split the company 2 different companies, so the name of the Company was setup to distribute mail with Dynamic distribution group. I have cha...
peteru27
Apr 21, 2021Copper Contributor
Maybe I have my self expressed not the right way, but I want to achieve that the mail is send to all users in this dynamic distribution group based on Company name. Like I said, we have split the company to two different names but for now I want only have one Dynamic group which is sending email to users in both Companies. The users are still in same OU the only difference is the Company name. So i would like do it with custom attribute but apparently is it not working. Is it because the the "rules" are created with "and" not "or" conditions? is it a litte bit more clear?
VasilMichev
Apr 21, 2021MVP
Yes, it's clearer now. When you are using the UI, the "rule" is always created with a logical "and" configuration. Use PowerShell instead:
Set-DynamicDistributionGroup DDGName -RecipientFilter "CustomAttribute12 -eq '55555' -or CustomAttribute15 -eq 'Teams'"
Set-DynamicDistributionGroup DDGName -RecipientFilter "CustomAttribute12 -eq '55555' -or CustomAttribute15 -eq 'Teams'"