Remove Inactive Dynamic Distribution Lists in Exchange Online 

Remove Dynamic Distribution List in Exchange Online

A significant update coming our way that could affect how we manage our dynamic distribution groups in Exchange Online.  

Microsoft has just announced that, starting in early April 2025, organizations in Exchange Online will be limited to 3,000 dynamic distribution lists only. 

If you’re an admin managing email flow with these groups, this change could shake things up! So, I will break down why is Microsoft making this change and how will it impact your organization. And most importantly, what can you do about it?  

What Are Dynamic Distribution Lists? 

For those who need a quick refresher, unlike static distribution lists, which are manually maintained, dynamic distribution groups in Microsoft 365 automatically update their membership based on criteria defined by the administrator.  

This means you don’t have to manually add or remove users—it happens automatically. 

For example, you can create a DDG for all users in the HR department, and as employees join or leave, the group updates itself. Most organizations prefer this way! 

The New Restriction on Dynamic Distribution Lists 

Now, onto the big news. Microsoft has announced that starting in early April 2025, there will be a hard limit of 3,000 dynamic distribution lists per organization in Exchange Online.  

This means that once you hit that number, you won’t be able to create any new DDGs unless you remove some of your existing groups. And yes, this isn’t a toggle in the admin settings – the change is automatic and non-negotiable. 

  • When does this happen? Early April 2025. 
  • Can you turn this off? Nope. 
  • What if you have fewer than 3,000 DDGs? You won’t be affected—until you hit the limit. 

So, if your organization is close to or over this limit, it’s time to clean up your DDGs before you get locked out. 

How to Export Unused Dynamic Distribution List Report in Exchange Admin Center? 

If you’re worried about hitting the 3,000 limits, the best thing to do is audit your current DDGs and delete any that aren’t needed. Microsoft provides a handy report inside the Exchange Admin Center (EAC): 

  1. Head over to the Exchange Admin Center (EAC) and navigate to the Reports section. 
  1. Navigate to Reports > Mail Flow > Dynamic Distribution Group Report  
  1. This report gives you insights number of frequently used and unused DDLs in the specific time frame. You can also find how many times it has been used as well as when it was last used kind of insights too!  
Remove Inactive Dynamic Distribution Lists in Exchange Online  - Exchnage Online
Remove Inactive Dynamic Distribution Lists in Exchange Online  3
  1. Review the list of DDGs and their activity status. If certain DDGs show little to no activity, those might be the ones for removal. 

After reviewing, you can delete Distribution Groups (DDGs) manually through the Exchange Admin Center, but it can be quite tedious to select them one by one. Personally, I prefer using PowerShell for this task, as it’s much more efficient. 

Script to Find & Delete Specific Dynamic Distribution Lists 

If you’re comfortable with PowerShell, you can automate the process of identifying and deleting unused Distribution Groups (DDGs). Since Get-MessageTrace only provides email data from the past 10 days, I’ve created a script that works around this limitation and removes unused DDGs. The script will: 

  1. Check if a DDG has received any emails in the last 10 days 
  1. Delete the DDL if it has no activity 

Before running the script, make sure to connect to Exchange Online first, and then execute the script: 

$DDGs = Get-DynamicDistributionGroup -ResultSize Unlimited 
$StartDate = (Get-Date).AddDays(-10) $EndDate = Get-Date 
foreach ($DDG in $DDGs) {  
$mailStats = Get-MessageTrace -RecipientAddress $DDG.PrimarySmtpAddress -StartDate 
$StartDate -EndDate $EndDate 
if ($mailStats.Count -eq 0) { 
    Write-Host "Deleting unused DDG (No activity in last 10 days): $($DDG.Name)" 
    Remove-DynamicDistributionGroup -Identity $DDG.Identity -Confirm:$false 
} 
}

This script will efficiently clean up unused DDGs that haven’t been emailed recently. 😊 

How to Delete Empty Dynamic Distribution Lists Using PowerShell 

The other script I wrote checks for any groups that have no members. If a dynamic distribution List (DDL) is found to have no members, it will automatically delete them. 

$DDGs = Get-DynamicDistributionGroup -ResultSize Unlimited 
$emptyDDGs = @()  # Initialize array for empty DDGs 
foreach ($DDG in $DDGs) { 
    # Get members of the Dynamic Distribution Group 
    $members = Get-Recipient -RecipientPreviewFilter $DDG.RecipientFilter -ResultSize 1 
       if (-not $members) { 
        Write-Host "Empty Dynamic Distribution Group Found: $($DDG.Name)" 
        $emptyDDGs += [PSCustomObject]@{ 
            Name              = $DDG.Name 
            PrimarySmtpAddress = $DDG.PrimarySmtpAddress 
        } 
        Write-Host "Deleting: $($DDG.Name)" -ForegroundColor Red 
        Remove-DynamicDistributionGroup -Identity $DDG.Identity -Confirm:$false 
    } 
} 
if ($emptyDDGs.Count -gt 0) { 
    Write-Host "`nDeleted Empty Dynamic Distribution Groups:" -ForegroundColor Yellow 
    $emptyDDGs | Format-Table -AutoSize 
} else { 
    Write-Host "No empty Dynamic Distribution Groups found." 
}

Finishing Up 

With Microsoft enforcing a 3,000 Dynamic Distribution Groups limit, now is the time to audit, clean up, and optimize your DDGs. If you have a large number of DDGs, start reviewing them now so you don’t run into issues in April 2025. 

The earlier you prepare, the smoother your transition will be! 

Previous Article

How to Enable QR Code Authentication Using Microsoft Entra Admin Center

Next Article

How to Set Up an Approval Workflow for ChatGPT Integration in Microsoft 365  

Write a Comment

Leave a Comment

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

Subscribe to Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Powered by Amail.