Oct 18 2019 04:03 PM - edited Oct 18 2019 07:58 PM
Hello. I have been asked to nest an Office 365 Group into a distribution list, but I don't believe this is possible. I had the bright idea that I could create a Dynamic Distribution List from the members of the UnifiedGroup, but my command is returning 0 members.
I got the below CN from PowerShell using:
"get-unifiedgroup (groupname) |fl"
I am trying:
memberofgroup -eq "CN=(groupname)_539b0afa-fa6e-4cfe-a3bb-e91cf0d435f0,OU=(companydomain).onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=NAMPR01A004,DC=prod,DC=outlook,DC=com"
Is "memberofgroup" functional for members of UnifiedGroups (Office 365 Group)?
Thank you,
Doug
Oct 18 2019 09:55 PM
Oct 19 2019 11:27 AM
What's the entire cmdlet? Here's an example that works just fine for me:
Get-Mailbox -Filter "MemberOfGroup -eq 'CN=default_8d405d20-65d9-4650-abca-352770e4438b,OU=tenant.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR03A001,DC=prod,DC=outlook,DC=com'"
And you can use the same filter for a DDG.
@ChrisWebbTech that's not true, those are simply the attributes exposed in the UI, but you can use pretty much anything for the recipientfilter query if you do it via PowerShell.
Oct 19 2019 12:28 PM
Oct 22 2019 02:38 PM
SolutionOk, I figured it out using powershell. 🙂 The key turned out to be the recipientfilter needed the recipientType and memberofgroup attributes>
New-DynamicDistributionGroup -Name "MyDDG" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (memberOfgroup -eq "CN=MyO365Group_430c61d4-7b32-4b35-957b-644912193d28,OU=MyCompany.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=NAMPR01A004,DC=prod,DC=outlook,DC=com"))}
Works like a charm.
Thanks for looking!
Doug
Oct 22 2019 02:38 PM
SolutionOk, I figured it out using powershell. 🙂 The key turned out to be the recipientfilter needed the recipientType and memberofgroup attributes>
New-DynamicDistributionGroup -Name "MyDDG" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (memberOfgroup -eq "CN=MyO365Group_430c61d4-7b32-4b35-957b-644912193d28,OU=MyCompany.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=NAMPR01A004,DC=prod,DC=outlook,DC=com"))}
Works like a charm.
Thanks for looking!
Doug