How to get full list of members from Microsoft 365 groups?

Eaven HUANG 2,156 Reputation points
2022-08-23T01:25:18.14+00:00

Dear experts,

We authorized some users to create private groups, where they would be able to send emails to the certain groups instead of putting the members' email address one by one. This works just fine but now we have a new request, to export all the members' email address from these certain groups.

I've googled around but didn't find a valid method. All I found was not really export the members' name or email address, it was just the group email address which was no use to me. I also tried Exchange Online admin page but it didn't do the trick. At Exchange it was shown as Microsoft 365 group.

Any advice would be really helpful!
Thanks again.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,386 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Dillon Silzer 56,681 Reputation points
    2022-08-23T02:56:44.22+00:00

    Hi @Eaven HUANG

    I believe what you are looking for is the ExchangePowerShell Module and Get-UnifiedGroup command.

    1) Open PowerShell as Administrator

    2) Run Set-ExecutionPolicy RemoteSigned

    3) Run the command Install-Module -Name ExchangeOnlineManagement

    4) Run Connect-ExchangeOnline and login with your credentials.

    5) Run the command Get-UnifiedGroup -Identity "Your Group Name" | Format-List

    This will get information about the group name.

    Get-UnifiedGroup (Documentation)

    https://learn.microsoft.com/en-us/powershell/module/exchange/get-unifiedgroup?view=exchange-ps

    ExchangePowerShell (Documentation)

    https://learn.microsoft.com/en-us/powershell/module/exchange/?view=exchange-ps


    If this is helpful please accept answer.

    1 person found this answer helpful.
    0 comments No comments

  2. Vasil Michev 100.2K Reputation points MVP
    2022-08-23T06:37:21.5+00:00

    There are plenty of scripts available online that do just that, here's one of mine: https://practical365.com/how-to-inventory-membership-of-exchange-groups-recursively/
    If you only want to list members of M365 Groups, run it like that:

    .\DG_members_recursive.ps1 -IncludeO365Groups  
    
    0 comments No comments