Dynamic Distribution list

The dynamic distribution list is a collection of users created dynamically based on their attributes. Dynamic distribution list creation is simple and maintenance is also easy. Manually Distribution list you have you remove/add users manually when employees join or leave.

So in this article, I will show you how to create a Dynamic distribution list multiply:

  • Exchange Online
  • Entra ID
  • Powershell

Let’s see all three method in details:

Exchange Online

Locate Group in Exchange Admin center

  • Click on Dynamic Distribution List and click on Add Group

Dynamic Distribution list

  • Select group type as dynamic distribution click Next

Choose Group Type

  • Give the Name and Description and click Next
  • Add the owner & choose who can be members (I select all members). Now, let’s put the condition of who can be a member dynamically. So I have added the province as WA and clicked Next. You can add more based on your custom Attributes.

Owner and dynamic query of dynamic distribution list

  • Give the Name of the list and click on the next
  • Review and create a group.

Azure AD

  • Go to Azure Portal and select the option for Entra ID.
  • Select the Groups option under Manage

Entra ID Group

  • Click on New Group
  • Select Group type M365 group, Give list name, add a meaningful description and choose membership is Dynamic.

Entra ID group details of Dynamic Distribution List

  • Add owner name & add dynamic query

Dynamic query

  • I have added based on country.
  • Click on Create.

PowerShell

  • Open PowerShell and connect with the exchange by typing the command “Connect-ExchangeOnline”
  • Use follo # Define the criteria for the Dynamic Distribution Group
    $GroupName = "SunilDDL3"
    $GroupAlias = " SunilDDL3"

    $GroupRecipientFilter = "Department -eq 'Sales' -and RecipientTypeDetails -eq 'UserMailbox'" #specify the filter
    $GroupEmailAddress = "[email protected]"  # Specify the desired email address

    # Dynamic Distribution Group creation query
    New-DynamicDistributionGroup -Name $GroupName -Alias $GroupAlias -RecipientFilter $GroupRecipientFilter

    # Set the SMTP for Dynamic Distribution Group
    Set-DynamicDistributionGroup -Identity $GroupName -PrimarySmtpAddress $GroupEmailAddress
  • I have used this as per my data but you can make it as complex as you need.

I hope this helps.

 

Check out more about Intune & I have a specific section for Windows troubleshooting  I hope you will like to explore.

Always check the Microsoft Learn website for new study programmes.

Leave a Comment

Optimized by Optimole