Hello,

We currently operate in a hybrid environment bridging the gap between Active Directory and Office 365, and we have intentions to transition to a fully cloud-based setup in the near future. I am contemplating the migration of our existing distribution lists from Active Directory to Office 365, ideally leveraging PowerShell or any other efficient method. Your guidance on this matter would be greatly appreciated.

Thank you.

9 Spice ups

Just sync them using Azure AD Connect or Entra Connect, or whatever they call it these days. Same as syncing accounts and mailboxes.

1 Spice up

So you are planning to get out of the hybrid situation? If so, I recommend building Microsoft 365 dynamic groups. Legacy distribution groups are annoying to deal with when you are cloud only as you can only control them from Exchange Admin and not in Entra (AAD).

Create or update a dynamic group in Microsoft Entra ID

If you don’t want it to be dynamic, just choose the Microsoft 365 group to have members instead of dynamic rules.

PowerShell will by your ally for this project. Gather all your info, create your scripts, and when it’s time to cutover run a test batch of DLs. Once you see those are successful do the rest. Good luck!

If you have any dynamic distribution lists that you must keep in place, you will need to create a contact for them in the opposing environment for them to work well in a hybrid Exchange setup (e.g., if you have a dynamic distribution list in Exchange on-premises, create a contact for it in Exchange Online).

Better option (if company leadership is on board) would be to recreate dynamic distribution lists as dynamic Office/Microsoft 365 Groups like @dillonjs ​ said. They work really well and you can add Teams features on top of them.

is there any way to automate this migration , instead of copying the members from AD groups , delete the DL from AD and wait for sync and than create a DL on o365?

@dillonjs

can you please help me create a powershell script , I never done it before

@tb33t

what are dynamic group exactly and how to use them

@jonathanolson5860

Unfortunately, I can’t create the script for you. After you do some web searches or ask ChatGPT I’ll be more than glad to help where I can.

They’re basically a way to create an Office 365 Group (essentially the foundation of a Microsoft Team - so it has an associated SharePoint site, a distribution list**, and a Planner board) but with dynamic membership. The only way I know to create them is in Entra ID (what Microsoft formerly referred to as Azure Active Directory). You will need to have Global Admin rights to create the dynamic Group, and I think (but I’m not 100% certain) you’ll also need to have an Entra ID Plan 1 (formerly Azure Active Directory Plan 1) license.

Microsoft’s documentation on how to go about creating it is pretty good.

** from what I recall of the Microsoft documentation, even though people typically interact with the Office 365 Group/Team’s “distribution list” like they would a normal, email-only distribution list, it’s technically closer to a shared mailbox in function.

Start first with exporting the distribution groups. After that, import them.

Please check this How to Migrate Distribution Groups to Office 365 blog for more insight.