Creating a Dynamic Distribution Group in Office 365 based on AD Security Group

Brad Fulmer
Brad Fulmer used Ask the Experts™
on
I'm trying to create a 365 Dynamic Distribution Group based on members from a security group.  I've tried the following with no results:

set-DynamicDistributionGroup -Identity 'Test Dist Group' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (MemberOfGroup -eq "CN=TestGroup,OU=Test,OU=CampusA,DC=A,DC=B,DC=C"))}

I can do a get-adgroupmember "TestGroup" and it pulls back the members

Powershell runs with no errors, however no members are added to the Distribution Group
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
You cannot reference on-premises Groups in the recipient filter. Replace the DN with a cloud group or simply use different criteria.
PberSolutions Architect

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Vasil Michev (MVP) (https:#a42396512)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Pber
Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial