This articles applies to:

Office 365

Exchange hybrid

PROBLEM:

After a mailbox is moved to Office 365 the user does not receive messages sent to an on-premise dynamic distribution group any more.

CAUSE:

Dynamic distribution groups are built on a query.

If this query is configured to specifically include mailbox recipients, like shown in the screenshot below, the user will “fall out” of the distribution list, when his mailbox is moved to Exchange online.

The reason: When a user mailbox is moved from the on-premise Exchange to Exchange online, the mailbox type changes from mailbox user  to mail user. As a consequence the mailbox will not to be get picked up by the query anymore.

SOLUTION:

In your on-premise Exchange Admin Center, go to Recpients / Groups and select the group you want to correct.

In the Distribution list properties, make sure that the option Mail users with external email addresses is selected. This will insure that the mailboxes located in Office 365 Exchange Online will be included as well.

faq000154

If you created a dynamic distribution group using a custom PowerShell script, you will not be able to edit it via Exchange Admin center GUI.

Here is an example of how to do it with PowerShell:

To get the Recipient Filter value for an existing Dynamic Distribution Group “Finance DL” use the following command:

Get-DynamicDistributionGroup -Identity "Finance DL" | Select-Object RecipientFilter

The filter will look something like this:

((((Department -eq 'Finance') -and (((RecipientType -eq 'UserMailbox'))))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'PublicFolderMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'AuditLogMailbox')))

The solution is to replace the following expression:

(RecipientType -eq ‘UserMailbox’)  with

((RecipientType -eq ‘UserMailbox’) -or (RecipientType -eq ‘MailUser’))

To modify the above shown filter example, you would use the Set-DynamicDistributionGroup command:

Set-DynamicDistrbutionGroup -Identity "Finance DL" -Recipient Filter "((((Department -eq 'Finance') -and ((((RecipientType -eq 'UserMailbox') -or (RecipientType -eq 'MailUser')))))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'PublicFolderMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'AuditLogMailbox')))"
Dejan Foro