Channel: blog.atwork.at
Viewing all articles
Browse latest Browse all 1118

Why we moved away from Exchange distribution groups to Office 365 groups


A very simple use case let us give up our Distribution lists. This article discusses why and how we did it and delivers tips how to improve your experience with Office 365 groups.

How can you replace “old” distribution groups from a synced environment with “new” Office 365 groups? And how to add, delete or modify email addresses to an Office 365 group? This article shows the steps.

After we replaced all distribution lists with Office 365 groups, we got some questions, like

  • “So, why not simply move to shared mailboxes?”
  • “Shared mailboxes offer the same functionality mail-wise. So why extend that to a whole Office 365 group were you get much more functionality?"

Our reasons are simple, but rational:

  • We do not believe in mail only solutions anymore. We see a lot of communication channels which offer much more flexibility in communication.
  • Office 365 groups give us a shared mailbox, a shared calendar, shared files, a shared OneNote notebook, guest access, Planner and much more. So we can focus on the team work without taking care about using different tools. Everyone in our team knows that related content to that team might be discoverable within their Office 365 group.
  • Flexibility: we do not need mail-based Office 365 groups every time, we have the flexibility to mix it with Yammer connected groups.
  • Better performance as connecting a lot of mailboxes to one single Outlook client.
  • Besides the fact, that the new Office 365 Groups offer self-service and a broad range of great collaboration tools, I want to point out the (main) reason for the replacement of the synchronized distribution groups in the following scenario.

The scenario

In the given environment, there is still an Active Directory (AD) domain controller in place (which is to be removed soon, all users are already AAD-joined and using Office 365 accounts). The AD is originated from a Microsoft Small Business Server (SBS) dated back a couple of years ago and the AD was upgraded to the latest schema gradually. So, there were some synchronized distribution groups as the following screenshot shows.


The main reason for finally moving to Office 365 was, that the distribution list “office” (with existing AD users as members) should be extended with a new cloud user. As every Office 365 admin knows, this does not work: In synchronized groups, you cannot mix synchronized users and cloud users. So, let’s re-create the distribution lists and replace them with modern Office 365 groups!

In a cloud only scenario you can simply upgrade a distribution list to an Office 365 group

In a cloud only scenario without a synchronization in place you would simply use the new upgrade possibilities to move from distribution groups to Office 365 groups. There are some ways to do that, either through Outlook for the web or the Exchange admin console. These options are also described here.

In Outlook for the web you upgrade by clicking the Upgrade button. You can convert a distribution group. Easy going.


In the Exchange Admin Console you’ll find this option as well. Navigate to Recipients / Groups and then either click on the new Groups button (3) or the Upgrade (4) button as well. Please be aware only cloud distribution lists will be available here. In the Exchange Admin console you can do a bulk upgrade.


You can perform those upgrade steps with PowerShell as well. Microsoft has prepared a nice scripting package to do that. The script will check if distribution lists are eligible to be upgraded and perform the upgrade.

The scripts for that are available here.


To start:

  • Download the script files from the Microsoft download center.

  • Verify you're using PowerShell 3.0.

  • Run the $env:PSModulePath.Split(";")[0] command in PowerShell to output a directory path. Copy the module DlMigrationModule.psm1 and strings file DlMigration.strings.psd1 to the directory location.

Which distribution lists can be upgraded?

As already stated, you can only upgrade cloud-only Distribution lists. This table lists what groups cannot be upgraded:

  • On-premises managed distribution list.
  • Nested distribution lists. Distribution list either has child groups or is a member of another group.
  • Distribution lists with member RecipientTypeDetails other than UserMailbox, SharedMailbox, TeamMailbox, MailUser
  • Distribution list which has more than 10 owners
  • Distribution list which only has members but no owner
  • Distribution list which has alias containing special characters
  • If the distribution list is configured to be a forwarding address for Shared Mailbox
  • If the DL is part of Sender Restriction in another DL.
  • Security groups
  • Dynamic Distribution lists
  • Distribution lists which were converted to RoomLists

Upgrade your legacy synchronized Distribution list to an Office 365 group

In our scenario we have synchronized distribution lists. So the easy approach does not work and we need some manual work to do.

Delete the old distribution groups

In order that the email addresses are available in the Office 365 tenant, the existing distribution groups must be deleted first. Alternatively, you can also rename them as in the screenshot above (see the scenario), where “office” (and all email aliases) was renamed to “officesynced” – and delete the distribution groups later.

Synchronize the changes to the cloud

After deleting (or renaming) the distribution groups, the changes need to be synchronized to the cloud. You can enforce that on the machine where AAD Connect runs:

  • Open Windows PowerShell as Administrator
  • Run Import-Module ADSync
  • Run Start-ADSyncSyncCycle -PolicyType Delta (or Start-ADSyncSyncCycle -PolicyType Initial– if you want to force an initial full sync)


This process can take some minutes (dependent on the size of the AD), till the changes are updated in Azure Active Directory (AAD) and in Exchange Online.

Create a new Office 365 group

Now, create the new Office 365 group. You can do that in the Outlook Web App, in Outlook for the Desktop or with PowerShell. Here’s a screenshot creating the new group in Outlook for the web.


It’s important that the desired email address is available – this means it must no longer existing in the Office 365 tenant. We will change that anyway, but again, you cannot use an existing email address for any object in Exchange Online. If you cannot create the email address immediately give Office 365 some time to replicate the latest changes and try again.

External members?

To be able to add external members (guests), add these users as guest.


Setting custom email addresses for the Office 365 group

The connection must be established first. Connect to Exchange Online and load the Remote Exchange PowerShell. See Connect to Exchange Online PowerShell for details or if you are not familiar with the connection process.

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange  `
-ConnectionUri https://outlook.office365.com/powershell-liveid/  `
-Credential $UserCredential  `
-Authentication Basic -AllowRedirection
Import-PSSession $Session

Run it and sign-in with a global admin of any Office 365 tenant. Now we can access the Office 365 groups.

Run Get-UnifiedGroup to get all Unified groups of the tenant, as here.


Now the new Office 365 groups can be modified. The desired result is that each group gets it’s corresponding primary email address, alias addresses if needed, and unused email addresses are removed. This can be done as follows.

For working with a specific group, we define a variable $group for all following operations. We get the relevant and existing data first. Here we modify the “office” group.

$group = "office"
Get-UnifiedGroup -Identity $group | select PrimarySmtpAddress, EmailAddresses | fl

The output for the relevant properties PrimarySmtpAddress and the alias EMailAddresses shows the values:

EmailAddresses : {smtp:office128@contoso.com, SMTP:office@contoso.com}
PrimarySmtpAddress : office@contoso.com

So, we can change the PrimarySmtpAddress (if needed):
Set-UnifiedGroup $group -PrimarySmtpAddress office@contoso.com

…and remove any unwanted email addresses:
Set-UnifiedGroup -Identity $group -EmailAddresses @{Remove='office128@contoso.com'}

…or set additional email alias addresses:

Set-UnifiedGroup -Identity $group -EmailAddresses @{Add='info@contoso.com'}

Check the result:
Get-UnifiedGroup -Identity $group | select PrimarySmtpAddress, EmailAddresses | fl

It usually takes up to a minute to see the desired result. Voila!

Email features

Hint: Don’t forget to mark your Office 365 group to be used from outside your organization. You can do that in the Edit group properties section in Outlook for the web. Otherwise nobody will be able to mail to the Office 365 group.


The alternate way is through PowerShell:

Set-UnifiedGroup –Identity $group –PrimarySmtpAddress office@contoso.com -RequireSenderAuthenticationEnabled $false

As shown in the screenshot above, Admins can also predefine if copies of all messages coming into the group shall be sent to the group members.

Subscribe or not? This is the question

When moving from Distribution groups to Office 365 groups the behavior changes: Members don’t need necessarily receive messages to the group in their personal Inbox. Now group members can decide by themselves if they want all messages in their Inbox as well or if they keep track or messages by looking into the group. Members can decide if they want to subscribe to the messages of the group or unsubscribe:


Things to remember

Be aware that group members can only delete the conversations they started. Only group owners have permission to delete all conversations. So, if a member needs to delete all messages in a group, that user must be assigned as owner. This can be accomplished in the group members page (as owner) as or with PowerShell (as Global Admin):

Add-UnifiedGroupLinks -Identity $group -LinkType Owners -Links some.user@contoso.com

Be aware that 100 is the maximum amount of owners per group!


Working with Office 365 groups is fun. The new groups provide self-service, new ways to collaborate and an easy way to replace old distribution groups. I hope this article supports in enjoying the Office 365 groups!

Viewing all articles
Browse latest Browse all 1118

Latest Images