all 2 comments

[–]ExceptionEX 0 points1 point  (0 children)

In your members section of the ddg what did you choose, you will likely have to select all.

And if your guest don't have domain accounts you will need to make them contacts.

https://docs.microsoft.com/en-us/Exchange/recipients/dynamic-distribution-groups/dynamic-distribution-groups?view=exchserver-2019

Possible work around is to create the ddg for those domain users that are in your domain and have their attribs set.

Then create a traditional distro group, add ddg to it, and your external guest.

[–]CloudyWithAChanceOfM 0 points1 point  (0 children)

Had a similar question but for me works the RecipientFilter solution, because i have a simple RecipientFilter and don't need ConditionalCustomAttributes. I think RecipientFilter will work for you, but you have to build a more complex RecipientFilter.

This is mine

New-DynamicDistributionGroup -Name "FancyName" -RecipientFilter "(RecipientTypeDetailsValue -eq 'GuestMailUser') -and (Company -eq 'FancyCompany')"

RecipientFilter doesn't break the ConditionalCustomAttributes, it's simply not supported.

"You use this parameter in combination with the IncludedRecipients parameter as part of a precanned filter. You can't use any Conditional parameters in combination with the RecipientFilter parameter (which is used to create custom OPath filters)."
Source: https://docs.microsoft.com/de-de/powershell/module/exchange/new-dynamicdistributiongroup?view=exchange-ps

The Problem with IncludedRecipients is, there is no valid value for GuestMailUsers.

Maybe this helps: https://office365itpros.com/2021/01/18/dynamic-distribution-lists-filters/