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. By default, this query is set to search for mailbox users. When a user mailbox is moved from the on premise to Office 365 Exchange online, his mailbox type changes to mail user. Due to that, it does not get picked up by the query anymore and “falls off the list”.
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.
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.
Modify your query syntax to include Recipients of Type MailUser (see example below)
Default Query
((((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’)))
Modified Query to include also Office 365 mailboxes
((((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’)))
He lives in Zurich, Switzerland and is a dedicated specialist, with 30 years of professional work experience in IT.
Before starting Exchangemaster GmbH he worked as a system engineer and project manager with customers of all sizes and across many industries: From small ISV startups and a NGO humanitarian organizations up to largest international corporations like Stryker, Swisscom, British Telecom and Nyrstar.
He spent his entire career delivering Microsoft based infrastructure solutions with main focus on Active Directory and Exchange. During those years, he collected a valuable work experience on 8 Exchange generations (2019, 2016, 2013, 2010, 2007, 2003, 2000 and 5.5) and has delivered services to a user base of more than 3.2 million mailboxes in on-premise, hybrid and Office 365 deployments.
Beside working on customer projects, he is a regular speaker and expert at Microsoft conferences and user groups. As a Microsoft Certified Trainer he also teaches Microsoft Official Curriculum courses to technical professionals around Europe.
For his work he has received numerous awards.
In 2005 he was the first member to be elected into the MCP Hall of Fame by Windows IT Pro Magazine readers choice (as 1 of 6 worldwide).
From 2005-2017, Dejan has been awarded by Microsoft Corporation with the yearly Microsoft Most Valuable Professional award in area of Exchange for 12 years in a row (one of approximately 100 worldwide and, at the time, the only 1 such in Switzerland).
- FAQ 000181 – How to enable mailbox auditing using PowerShell - August 1, 2023
- FAQ 000180 – How to set Microsoft Teams Room Device to use internal NTP server - December 15, 2021
- FAQ 000178 – How to change the sender and reply E-mail address in Microsoft Bookings - January 11, 2021