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

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
Brad FulmerAsked:
Who is Participating?
 
Vasil Michev (MVP)Commented:
You cannot reference on-premises Groups in the recipient filter. Replace the DN with a cloud group or simply use different criteria.
0
 
PberSolutions ArchitectCommented:
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
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.

All Courses

From novice to tech pro — start learning today.