Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 92
  • Last Modified:

Office 365 dynamic distribution list

My company has several domains registered with Office 365. I need to create distribution lists for each domain that includes all users for that domain (i.e. all@domain1.com, all@domain2.com, etc.). I would like the list to be dynamically updated so that we aren't manually adding users to the list every time an account is created. Is this possible?
0
Christopher Perry
Asked:
Christopher Perry
  • 3
  • 2
  • 2
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
Dynamic Distributuion Group
1
 
Christopher PerryAuthor Commented:
David, wouldn't this solution require manually defining the "Custom attribute 1" value for every user upon creation?
0
 
Vasil Michev (MVP)Commented:
Should be possible via something like this:

Set-DynamicDistributionGroup domain -RecipientFilter {((Alias -ne $null) -and (UserPrincipalName -like "*@domain.com"))}

However, it will error out saying wildcards are not allowed. While the same syntax will work perfectly fine for address lists. I've asked the team to clarify on this...

If it turns out wildcards are not supported indeed, your other option is to populate some of the extension attributes and filter on those. However, it's pretty much the same as adding all mathing users manually to a DG, so not really a solution here.
0
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 
David Johnson, CD, MVPOwnerCommented:
Yes since I only want 1 domain in that DDG when I create it otherwise it will apply to all domains. Once created it just works
0
 
Vasil Michev (MVP)Commented:
Unfortunately, this is by design - you cannot use leading wildcards in EO. Here's the documentation on it:

The RecipientFilter parameter specifies an OPath filter that's based on the value of any available recipient property. You can use any available Windows PowerShell operator, and wildcards and partial matches are supported. When you use this parameter, remember the following OPath filter rules:


Use braces { } around the whole OPath syntax string.


Include a hyphen before all operators.


In cloud-based environments, you can't use a wildcard as the the first character. For example, Sales* is allowed, but *Sales isn’t allowed.

https://technet.microsoft.com/en-us/library/bb125127(v=exchg.160).aspx
0
 
Christopher PerryAuthor Commented:
Vasil,

You confirmed my fear... I'm going to mark your answer as correct if I don't hear any other solutions in the next 48 hours.

Thank you!
0
 
David Johnson, CD, MVPOwnerCommented:
Asker was going to accept and then come back
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now