Forum Discussion
Does anyone know how I can get a list of all the members of a Viva Engage Community?
While there’s currently no built-in option within Yammer/Viva Engage to directly export community members, the communities are integrated with Microsoft 365 Groups.
If you're an admin (group owner), you can use PowerShell to retrieve and export the full list of members without much hassle.
Here’s a script to get this.
# Connect to Microsoft Graph
Connect-MgGraph -Scopes "Group.Read.All", "User.Read.All"
# Replace with your actual Group ID
$GroupId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# Get all group members
$members = Get-MgGroupMember -GroupId $GroupId -All
# Filter only user objects and retrieve full user details
$memberDetails = foreach ($member in $members) {
if ($member.AdditionalProperties['@odata.type'] -eq '#microsoft.graph.user') {
Get-MgUser -UserId $member.Id
}
}
# Export relevant user information to CSV
$memberDetails | Select-Object Id, DisplayName, Mail, UserPrincipalName |
Export-Csv -Path "C:\GroupMembers.csv" -NoTypeInformation
Write-Host "Export complete. CSV saved to C:\GroupMembers.csv"