Forum Discussion

pcryan5220's avatar
pcryan5220
Copper Contributor
Nov 21, 2023

Can a Dynamic Distribution list group be created that uses a specific SMTP domain as the filter?

Our corporate Microsoft 365 Exchange environment has users with different SMTP addresses. (e.g., @ work1.com @ work2.com etc.).   Can a Dynamic Distribution list group be created that uses a speci...
  • VasilMichev's avatar
    VasilMichev
    Nov 23, 2023
    Hm, I hate it when I've overlooked something and Tony gets to be right 😄 Nope, we cannot use -like due to the limitation Tony mentioned. I do however have a working domain-based DDG, with the following filter:

    (Get-DynamicDistributionGroup domain).RecipientFilter
    ((WindowsLiveID -eq '*@michev.onmicrosoft.com')

    WindowsLiveID here can be used as a replacement for UPN, and does work for the filter:

    [09:34:55][O365]# Get-DynamicDistributionGroupMember domain

    Name RecipientType
    ---- -------------
    HuKu UserMailbox
    michev_gmail.com#EXT# MailUser

    Apologies about the confusion, should have actually checked my setup first.

Resources