Forum Discussion
kcelmer
Sep 18, 2025Brass Contributor
Why does this return a .csv with the length of the group names?
Hi, I've been trying to list the names of the Entra groups a user is a member of. Most of the scripts I've found online will only display the group ID and leaves the other fields blank, if they ...
VladFL
Sep 19, 2025Copper Contributor
Get-MgUserMemberOf -UserId $UserId -All |
Select-Object `
@{Name='GroupId'; Expression={ $_.Id }},
@{Name='DisplayName'; Expression={ $_.AdditionalProperties['displayName'] }} |
Export-Csv .\User-Groups.csv -NoTypeInformation -Encoding utf8
Here is another option )))