Forum Discussion

Thomas Cezario's avatar
Thomas Cezario
Copper Contributor
Jul 06, 2017

Dynamic Groups Office 365

Hi,

 

I would like to create a dynamic group that only members of a given domain are part of it. I used the command below to define the members of this group based on the RecipientFilter. However, the parameter does not work well and the filter is not applied.

 

Set-DynamicDistributionGroup -Identity mygroupdynamic@domain.com -RecipientFilter "(PrimarySmtpAddress -like 'domain.com')"

 

Can you help me in this case?

 

Thank you.

3 Replies

  • Thomas Cezario's avatar
    Thomas Cezario
    Copper Contributor

    Thanks for the answer. However I would like to use something related to the script I sent, I tried in several ways but it does not work.

     

    :(

  • You can use this guide to create Dynamic Distribution Groups with added rule/criteria for membership (just like in your case wherein you need to set specified domain). Also, try to put '@domain.com' on the parameter instead and see if it works for you.

    • jcgonzalezmartin's avatar
      jcgonzalezmartin
      MVP
      Bear in mid that you can do this with Distribution Groups, but not with Office 365 Groups...for having dynamic membership you will require Azure AD Premium

Resources