Forum Discussion
Samer Forever
Jul 23, 2018Copper Contributor
How the export Azure AD security group members email addresses into CSV?
Hi Forum, How the export Azure AD security group members email addresses into CSV? I tried this PowerShell command: Get-AzureADGroupMember -ObjectId "xxxx...." | Export-csv -path C:\Temp\Outp...
Deleted
Jul 23, 2018you'll want to pipe in between there the get-azureaduser in between there to get the user details. so something like get-azureadgroupmember -objectid "xxx" | get-azureaduser | export etc. etc.
- VasilMichevJul 23, 2018MVP
There's no need for that, as the AAD module returns the full object, it's simply not shown in the default formatting. So for example, this will do the trick:
Get-AzureADGroupMember -ObjectId 84b18857-3c01-48be-b707-492019c57142 | select UserPrincipalName,ProxyAddresses | Export-Csv -nti blabla.csv
- DeletedJul 23, 2018actually Max's response would work too, I was still asleep this morning, I would take back my response lol.