Office 365 and Dynamic Distribution Groups

Updated Dec 8th 2011 to remove reference to LegacyExchangeDN

In Office 365 with Hybrid Deployment, if you create Dynamic Distribution Groups on the on-premises Exchange organization, these objects are not replicated to Office 365 via DirSync. Therefore for mailboxes in the Office 365 cloud they will not see the Dynamic Distribution Group in their Global Address List, and so therefore can only email the members of the list by sending an email directly to their email address.
To show the Dynamic Distribution Group in the GAL in the cloud, you need to add a MailContact to the cloud that represents the Dynamic Distribution Group. This MailContact object should have the following mappings:

On-Premises DDL Cloud MailContact
Name Name
proxyAddress ExternalEmailAddress
Alias Alias

Note that this MailContact object is made in Office 365 or Exchange Online and not in the on-premises AD. It is not replicated to the cloud via DirSync. If it exists on premises then the name for the DDL will appear twice in the on-premise GAL, once as a DDL and once as a contact object.
To determine the information need for the cloud contact object, run the following in Exchange Management Shell on premises:

Get-DynamicDistributionGroup | fl Name,EmailAddresses,LegacyExchangeDN

An alternative is to create the DDL in both the cloud and on-premises, but this can only happen if the attributes you are filtering on on-premises are replicated to the cloud via DirSync.




12 responses to “Office 365 and Dynamic Distribution Groups”

  1. Jimmy Marchetto avatar

    If the dynamic distribution group is updated OnPremise, it will not be updated in the cloud, is it ?
    It is not easier to schedule a script which creates/update a MailContact every day ?


  2. Brian Reid avatar

    The dynamic distribution list is not synced to the cloud, so no it will not be updated in the cloud – this is the point of this blog. You need to create a contact object that represents the dynamic distribution list in the cloud – the contact is just pointing to the email address of the dynamic distribution group, so you only need to change the contact if you change the email address of the dynamic distribution group.

  3. Jimmy Marchetto avatar

    Ok 🙂

    Thx for the answer.

  4. Zdenek Stava avatar

    Hello, we have hybrid coexistence deployment and shared domain. We have same problem. try somebody create the contact on cloud-based Exchange and send email to dynamic distribution group ? Is it functional ? Coud you describe how did you create this contact ? I created external contact on web outlook administration as cloud admin, after that I see this contact in Exchange 2010 console on Cloud-based server. External SMTP address point to on-premise dynamic address but mail still cannot send from cloud to this on-premise group. I stil recieve NDR, address not found. Coud you help me please?

  5. Brian Reid avatar

    @Zdenek you need to provide further info. For example, if you have a DDG on-premises with the email address, then you need to create a contact who’s external mail address in the cloud is

  6. Zdenek Stava avatar

    I resoved it. I create external contact on cloud-based web outlook administration. Todays it work fine. I think that was problem in Outlook cached address. I try send from OWA, it works. Thank you.

  7. Tim Chapman avatar
    Tim Chapman

    I have created the new mailcontact on exchange online but am struggling to set the legacyexchangedn to match the on-premise one. How do I do that?

  8. Brian Reid avatar

    I have updated the post to remove the reference to LegacyExchangeDN as that cannot be changed! So therefore it was never needed – sorry for the misinformation!

  9. Edu Noronha avatar

    Hello Brian.
    I understand how to send e-mails from a cloud-based users to an on-premises dynamic list. But what can I do to receive e-mails sent to a DDL where the migrated users don´t stay more in that DDL?
    Best regards.


  10. Brian Reid avatar

    @Edu – I don’t fully understand your question. Do you mean you have a DDL on-premises and mailboxes where in the scope of the DDL but have now been moved to the cloud?

    The DDL is based on one or more properties of the user account and/or mailbox. If the DDL is based on properties of the user account, then the user is still in the DDL even though the mailbox is remote. Therefore they should still get emails to the DDL. If the DDL is based on mailbox properties and the mailbox no longer has these properties then it is correct, they should not get the email.

  11. Hesham Mousa avatar

    is it possible to do it the other way ?, i created the DDG on office 365 and on premise user should send to it.
    can i create the contact on premise? will this force the contact to sync to office365 and create duplicate entries ?

    1. Brian Reid avatar

      This will work fine. If the DDG is (in the cloud) and the contact is that will work and sync (as they are different). The trick here is that the contact has a targetAddress attribute of who it is a contact for, and the targetAddress attribute for the contact is Therefore, set the contact to be a contact for the DDG’s email address but not to be the email address for the contact.

      Note though, that as you are DirSync’ing to the cloud you should not be creating object in the Office 365 service as they will never appear in the GAL on premises.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.