Create and manage distribution list groups in Exchange Online

Use the Exchange admin center (EAC) or Exchange Online PowerShell to create, modify, or remove distribution list groups in your Exchange Online organization.

You can use Exchange Online PowerShell to convert an existing distribution list group into a shared mailbox. For information, see the Use Exchange Online PowerShell to convert a distribution list group into a shared mailbox section later in this article.

There are two types of groups that can be used to distribute messages:

  • Mail-enabled universal distribution groups (also called distribution list groups) can be used only to distribute messages.

  • Mail-enabled universal security groups (also called security groups) can be used to distribute messages and to grant access permissions to resources. For more information, see Manage mail-enabled security groups.

It's important to note the terminology differences between Active Directory and Exchange Online. In Active Directory, a distribution list group refers to any group that doesn't have a security context, whether it's mail-enabled or not. In contrast, in Exchange Online, all mail-enabled groups are referred to as distribution list groups, whether they have a security context or not.

What do you need to know before you begin?

Use the Exchange admin center to manage distribution list groups

Use the EAC to create distribution list groups

  1. In the EAC, click Recipients > Groups > Distribution list.

  2. Click Add a group and follow the instructions in the details pane.

    • Under Choose a group type section, select Distribution and click Next.

    • Under Set up the basics section, enter the details and click Next.

  3. In Assign owners section, click Assign owners Add icon., select the group owner from the list, and click Next.

  4. Under Add members, click Add members Add icon., select the group members from the list, and click Next.

  5. In Edit settings section, enter the group email address, select the following boxes and then click Next:

    • Communication: Select the checkbox to allow people outside of the organization to send email to this distribution list group.

    • Joining the group: Select who are allowed to join the group.

      1. Open: Anyone can join this group without owner approval.

      2. Closed: Only group owners can add members. All requests to join are automatically denied.

      3. Owner approval: Anyone can request to join this group and owners must approve the request.

    • Leaving the group: Select who are allowed to leave the group.

      1. Open: Anyone can leave this group without group owner approval.

      2. Closed: Only group owners can remove members. All requests to leave are automatically denied.

  6. In Review and finish adding group section, verify all the details, click Create group, and then click Close.

Use the EAC to modify distribution list groups

  1. In the EAC, click Recipients > Groups > Distribution list.

  2. On the Groups page, select an individual group by clicking anywhere in the row other than the button option that appears in the blank area next to the Group name column.

  3. On the Distribution list group properties page, click one of the following sections to view or change properties.

    • General

    • Members

    • Settings

  4. When you're finished, click Save.

Use the EAC to convert distribution list groups into shared mailboxes

Important

Prior to converting an existing distribution list group into a shared mailbox, replace your existing distribution list group's address with another address so that this distribution list group is free to be converted into a shared mailbox. An address being used for a distribution list group cannot be converted into a shared mailbox.

Once you've freed the existing distribution list group from the email address that's to be used for the shared mailbox, perform the following steps:

  1. Create shared mailbox.
  2. Add users to the shared mailbox.
  3. Assign Full Access and Send As permissions to members of a shared mailbox

Create shared mailbox

  1. Go to Recipients > Mailboxes > Add a shared mailbox Add icon..

  2. Fill in the required fields:

    • Display name: A display name based on your discretion

    • Email address: Specifically the email address that was freed from the distribution list group.

  3. Click Create to save your changes and create the shared mailbox.

Add users to the shared mailbox

  1. Select the newly created shared mailbox by clicking anywhere in the row other than the button option that appears in the blank area next to the Group name column.

  2. In the Distribution list group flyout that opens, click View all and manage members.

  3. Click Add members Add icon..

  4. In the Search members list text box, enter the names of the members who were part of the distribution list group that you had freed the email address from.

  5. Once their names appear under Members, check the checkbox corresponding to the names of those persons you want to add as members of the shared mailbox.

  6. Select Save.

Assign Full Access and Send As permissions to members of a shared mailbox

  1. Go to Recipients > Mailboxes.

  2. Select a mailbox and click Mailbox delegation

  3. In the Manage mailbox delegation flyout that opens, click Edit Edit icon..

  4. To grant Full Access and Send As permissions, click Add members Add icon. and then select the users you want to grant permissions to.

    Note

    The Full Access permission allows a user to open the mailbox as well as create and modify items in it. The Send As permission allows anyone other than the mailbox owner to send email from this shared mailbox. Both permissions are required for successful shared mailbox operation.

  5. Click Save to save your changes.

Use Exchange Online PowerShell to convert a distribution list group into a shared mailbox

There's no automated method for converting a distribution group into a shared mailbox. This section describes the manual steps for creating a shared mailbox with the same members, email addresses, and similar properties as the group in Exchange Online PowerShell.

Caution

This procedure requires you to delete the distribution group before you create the replacement shared mailbox. Record as much information as you can about the group as described in the early steps of the procedure. You can also use the Microsoft 365 admin center and the new Exchange admin center (new EAC) to record information about the group.

  1. The following commands serve two purposes:

    • To see if the distribution group is a member of other groups. After you replace the group with a shared mailbox, you need to add the shared mailbox as a member of those groups.
    • To record the members of the group that you're going to convert.
    $dgs = Get-DistributionGroup -ResultSize unlimited
    
    $dgs | foreach {Write-Output -InputObject `r`n,($_.Name),"Group Members",("-"*25); Get-DistributionGroupMember -Identity $_ -ResultSize unlimited}
    

    For detailed syntax and parameter information, see Get-DistributionGroup and Get-DistributionGroupMember.

  2. To record all properties of the distribution group to convert, use the following syntax:

    Get-DistributionGroup -Identity <GroupIdentity> | Format-List
    

    Where <GroupIdentity> is the name, alias, or email address of the group.

    For example:

    Get-DistributionGroup -Identity Marketing | Format-List
    

    To reveal the full value of a truncated property, replace <PropertyName> with the property name, and then run the following command:

    Get-DistributionGroup -Identity Marketing | Select-Object -ExpandProperty <PropertyName>
    

    For detailed syntax and parameter information, see Get-DistributionGroup.

  3. Delete the distribution group by using the following syntax:

    Remove-DistributionGroup -Identity <GroupIdentity>
    

    For example:

    Remove-DistributionGroup -Identity marketing@contoso.com
    

    For detailed syntax and parameter information, see Remove-DistributionGroup.

  4. Create the replacement shared mailbox using the following syntax and property values from the deleted distribution group.

    • At a minimum, set the PrimarySMTPAddress and DisplayName values of the new shared mailbox to the values from the deleted distribution group.
    • When you create the shared mailbox, you can also set the following properties to match the deleted distribution group:
      • Name
      • Alias
      • ModerationEnabled (the default value is $false)
      • ModeratedBy (the default value is empty)
      • SendModerationNotifications (the default value is Always)

    The additional properties that are available to configure in PowerShell after you create the shared mailbox are listed in Step 8.

    This example creates a new shared mailbox with the name, alias, display name, and primary email address of the deleted distribution group.

    New-Mailbox -Shared -Name Marketing -Alias marketing -DisplayName "Marketing Group" -PrimarySMTPAddress marketing@contoso.com
    

    For detailed syntax and parameter information, see New-Mailbox.

  5. Use the list of groups that contain the deleted group from Step 1 to add the shared mailbox as a member of any required distribution groups or mail-enabled security groups by using the following syntax:

    $m = "<GroupEmailAddress1>","<GroupEmailAddress2>",..."<GroupEmailAddressN>"
    
    $m | foreach {Add-DistributionGroupMember -Identity $_ -Member <SharedMailboxIdentity}
    

    For example:

    $m = "allemployees@contoso.com","announcements@contoso.com"
    
    $m | foreach {Add-DistributionGroupMember -Identity $_ -Member marketing@contoso.com}
    

    For detailed syntax and parameter information, see Add-DistributionGroupMember.

  6. Use the list of members from the deleted group that you recorded in Step 1 to give valid mail-enabled security principals (mailboxes, mail users, or mail-enabled security groups) FullAccess permission to the shared mailbox using the following syntax:

    $u = "<UserOrGroupEmailAddress1>","<UserOrGroupEmailAddress2>",..."UserOrGroupEmailAddressN"
    
    $u | foreach {Add-MailboxPermission -Identity <SharedMailboxIdentity> -AccessRights FullAccess -User $_}
    

    For example:

    $u = "julia@contoso.com","laura@contoso.com"
    
    $u | foreach {Add-MailboxPermission -Identity Marketing -AccessRights FullAccess -User $_}
    

    For detailed syntax and parameter information, see Add-MailboxPermission.

  7. Use the list of members from the deleted group that you recorded in Step 1 to give valid mail-enabled security principals (mailboxes, mail users, or mail-enabled security groups) Send As permission in the shared mailbox using the following syntax:

    Tip

    The variable $u from the previous step should already identify the former group members who need Send As permission on the shared mailbox, so you can reuse that variable in this step. Otherwise, use the same syntax as the previous step to identify new users: $u = "<UserOrGroupEmailAddress1>","<UserOrGroupEmailAddress2>",..."UserOrGroupEmailAddressN"

    $u | foreach {Add-RecipientPermission -Identity <SharedMailboxIdentity> -AccessRights SendAs -Trustee $_}
    

    For example:

    $u | foreach {Add-RecipientPermission -Identity Marketing -AccessRights SendAs -Trustee $_}
    

    For detailed syntax and parameter information, see Add-RecipientPermission.

  8. Use the Set-Mailbox cmdlet or the new EAC to configure other properties from the deleted group that weren't available when you created the shared mailbox in Step 4.

    For example, the following parameters are available on the Set-Mailbox cmdlet:

    • AcceptMessagesOnlyFrom
    • AcceptMessagesOnlyFromDLMembers
    • AcceptMessagesOnlyFromSendersOrMembers
    • BypassModerationFromSendersOrMembers
    • CustomAttribute1 to CustomAttribute10
    • EmailAddresses
    • ExtensionCustomAttribute1 to ExtensionCustomAttribute5
    • GrantSendOnBehalfTo
    • HiddenFromAddressListsEnabled
    • MailTip
    • MailTipTranslations
    • RejectMessagesFrom
    • RejectMessagesFromDLMembers
    • RejectMessagesFromSendersOrMembers
    • SendModerationNotifications

    The parameters that were mentioned in Step 4 on the New-Mailbox cmdlet are also available on the Set-Mailbox cmdlet.

    For detailed syntax and parameter information, see Set-Mailbox.

  9. By default, messages sent from the shared mailbox by users with Send As permission aren't copied to the sender. To change the behavior so messages are copied to the sender, use the following syntax:

    Set-Mailbox -Identity <SharedMailboxIdentity> -MessageCopyForSentAsEnabled $true
    

    For example:

    Set-Mailbox -Identity Marketing -MessageCopyForSentAsEnabled $true
    

    For detailed syntax and parameter information, see Set-Mailbox.

  10. Tell users to remove the deleted group entry from their AutoComplete list in Outlook. Even though the new shared mailbox and the deleted group have the same information, the current entry in the AutoComplete list is tied to the deleted group, so the current entry needs to be removed. For instructions, see Remove AutoComplete list entries one at a time.

General

Use this section to view or change basic information about the group.

  • Name: This name appears in the address book, on the To line when email is sent to this group, and in the Groups list. The display name is required and should be user-friendly so people recognize what it is. It also has to be unique in your domain.

  • Description: Use this box to describe the group so people know what the purpose of the group is. This description appears in the address book and in the Details pane in the EAC.

Email options

Use this section to view or change the email addresses associated with the group. This includes the group's primary SMTP addresses and any associated proxy addresses. Under Edit email addresses page, change/edit the Primary email address, add/delete Aliases, and then click Save changes.

You can also select the group and then click Edit email address from the toolbar to change/edit the Primary email address, add/delete Aliases, and then click Save changes.

Members

Use this section to change/edit the following:

  • Under Owners section, click View all and manage owners to add/remove group owners from the drop-down list and then click Save changes. The distribution list group must have at least one owner.

  • Under Members section, click View all and manage members to add/remove group members from the drop-down list and then click Save changes. The distribution list group must have at least one member.

Settings

Under General settings section, select the checkbox Allow external senders to email this group if you want to allow the external users to send email to this group.

Delivery management

Use this section to manage who can send email to this group.

  • Sender options: By default, only people inside your organization can send message to this group. You can also allow people outside the organization to send message to this group.

  • Only allow messages from people inside my organization: Select this option to allow only senders in your organization to send messages to the group. This means that if someone outside your organization sends an email message to this group, it is rejected. This is the default setting.

  • Allow messages from people inside and outside my organization: Select this option to allow anyone to send messages to the group.

  • Specified senders: You can further limit who can send messages to the group by allowing only specific senders to send messages to this group. Select/remove one or more recipients/group from the drop-down list. If you add senders to this list, they are the only ones who can send mail to the group. Mail sent by anyone not in the list will be rejected.

    Important

    If you've configured the group to allow only senders inside your organization to send messages to the group, email sent from a mail contact is rejected, even if they're added to this list.

Manage delegates

Use this section to assign permissions to a user (called a delegate) to allow them to send messages as the group or send messages on behalf of the group. You can assign the following permissions:

  • Send As: This permission allows the delegate to send messages as the group. After this permission is assigned, the delegate has the option to add the group to the From line to indicate that the message was sent by the group.

  • Send on Behalf: This permission also allows a delegate to send messages on behalf of the group. After this permission is assigned, the delegate has the option to add the group to the From line. The message will appear to be sent by the group and will say that it was sent by the delegate on behalf of the group.

To assign permissions to delegates in EAC, add the delegates under the Edit delegates page, select the Permission type from the drop-down list and click Save changes.

Message approval

Use this section to set options for moderating the group. Moderators approve or reject messages sent to the group before they reach the group members.

  • Require moderator approval for messages sent to this group: This check box isn't selected by default. If you select this check box, incoming messages are reviewed by the group moderators before delivery. Group moderators can approve or reject incoming messages.

  • Group moderators: To add/remove group moderators, search/add users from the drop-down list. If you've selected Require moderator approval for messages sent to this group and you don't select a moderator, messages to the group are sent to the group owners for approval.

  • Add senders who don't require message approval: To add/remove users that can bypass moderation for this group, search/add users from the drop-down list.

  • Notify a sender if their message isn't approved: Use this section to set how users are notified about message approval.

  • Only sender: This is the default setting. Notify all senders, inside and outside your organization, when their message isn't approved.

  • Only senders in your organization: When you select this option, only users or groups in your organization are notified when a message that they sent to the group isn't approved by a moderator.

  • No notifications: When you select this option, notifications aren't sent to senders whose messages aren't approved by the group moderators.

Membership approvals

Use this section to edit membership approvals and to specify if group owner approval is needed for users to join or leave this group.

  • Joining the group: View/Edit who are allowed to join the group.

    1. Open: Anyone can join this group without owner approval.

    2. Closed: Only group owners can add members. All requests to join are automatically denied.

    3. Owner approval: Anyone can request to join this group and owners must approve the request.

  • Leaving the group: View/Edit who are allowed to leave the group.

    1. Open: Anyone can leave this group without group owner approval.

    2. Closed: Only group owners can remove members. All requests to leave are automatically denied.

Use the EAC to remove distribution list groups

  1. In the EAC, go to Recipients > Groups.

  2. In the list of groups, select the distribution list group that you want to remove, and then click Delete group.

Use the EAC to convert distribution list groups into shared mailboxes

You can convert an existing distribution list group into a shared mailbox. For information on how to do it, see How to convert a distribution list to a shared mailbox.

Use PowerShell to manage distribution list groups

Use Exchange Online PowerShell to create distribution list groups

This example creates a distribution list group with an alias itadmin and the name IT Administrators. The distribution group is created in the default OU, and anyone can join this group without approval by the group owners.

New-DistributionGroup -Name "IT Administrators" -Alias itadmin -MemberJoinRestriction open

For detailed syntax and parameter information, see New-DistributionGroup.

Use Exchange Online PowerShell to modify distribution list groups

Use the Get-DistributionGroup and Set-DistributionGroup cmdlets to view and change properties for distribution list groups. Advantages of using Exchange Online PowerShell are the ability to change the properties that aren't available in the EAC and to change properties for multiple groups. For information about which parameters correspond to distribution list group properties, see the following articles:

Here are some examples of using Exchange Online PowerShell to change distribution group properties.

This example changes the primary SMTP address (also called the reply address) for the Seattle Employees distribution group from employees@contoso.com to sea.employees@contoso.com. Also, the previous reply address will be kept as a proxy address.

Set-DistributionGroup "Seattle Employees" -EmailAddresses SMTP:sea.employees@contoso.com,smtp:employees@contoso.com

This example enables moderation for the distribution group Customer Support and sets the moderator to Amy. In addition, this moderated distribution group will notify senders who send mail from within the organization if their messages aren't approved.

Set-DistributionGroup -Identity "Customer Support" -ModeratedBy "Amy" -ModerationEnabled $true -SendModerationNotifications 'Internal'

This example changes the user-created distribution group Dog Lovers to require the group manager to approve users' requests to join the group. In addition, by using the BypassSecurityGroupManagerCheck parameter, the group manager will not be notified that a change was made to the distribution list group's settings.

Set-DistributionGroup -Identity "Dog Lovers" -MemberJoinRestriction 'ApprovalRequired' -BypassSecurityGroupManagerCheck

This example exports the members of a distribution group to a .csv file named DLGroupMembers.csv.

$Groups = Get-DistributionGroup -ResultSize Unlimited
$Groups | ForEach-Object {
$group = $_
Get-DistributionGroupMember -Identity $group.Name -ResultSize Unlimited | ForEach-Object {
    New-Object -TypeName PSObject -Property @{
        Group = $group.DisplayName
        Member = $_.Name
        EmailAddress = $_.PrimarySMTPAddress
        RecipientType= $_.RecipientType
        }
    }
} | Export-CSV ".\DLGroupMembers.csv" -NoTypeInformation -Encoding UTF8

This example exports the members of a dynamic distribution group to a .csv file named DDLGroupMembers.csv.

$Groups = Get-DynamicDistributionGroup -ResultSize Unlimited
$Groups | ForEach-Object {
$group = $_
Get-DynamicDistributionGroupMember -Identity $group.Name -ResultSize Unlimited | ForEach-Object {
    New-Object -TypeName PSObject -Property @{
        Group = $group.DisplayName
        Member = $_.Name
        EmailAddress = $_.PrimarySMTPAddress
        RecipientType= $_.RecipientType
        }
    }
} | Export-CSV ".\DDLGroupMembers.csv" -NoTypeInformation -Encoding UTF8

How do you know these procedures worked?

To verify that you've successfully created, modified, or removed a distribution list group, do any of the following steps:

  • In the EAC, select the group to view the property or feature that you changed. Depending on the property that you changed, it might be displayed in the details pane for the selected group.

  • In Exchange Online PowerShell, replace <GroupIdentity> with the name, alias, or email address of the distribution list group, and run the following command to verify the settings:

    Get-DistributionGroup -Identity "<GroupIdentity>" | Format-List
    

    To view specific properties, run the following command:

    Get-DistributionGroup -Identity "<GroupIdentity>" | Format-List Name,PrimarySmtpAddress
    
  • To get a list of members in the group, replace <GroupIdentity> with the name, alias, or email address of the distribution list group, and run the following command:

    Get-DistributionGroupMember -Identity "<GroupIdentity>"
    

    For detailed syntax and parameter information, see Get-DistributionGroupMember.