Forum Discussion
Badal Ratra
Feb 11, 2019Iron Contributor
Export groups
Hi all, What are best way to export Office 365 and azure active directory security groups in hybrid environment? Many thanks.
Vinoth_Azure
Feb 11, 2019MCT
Getting the O365 Security Groups members by below steps,
Step 1: Connect to O365 online Services Using Powershell
#connect-msolservice
# Get-MSOLGroup "Security Group Name"
Step 2: Copy the Group ID
Step 3: Exporting the users from the Security Group running following command in Powershell
Get-MsolGroupMember -groupObjectid ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ | Select DisplayName,EmailAddress,GroupMemberType | Export-csv C:\Desktop\SecurityGroup.csv -notypeinformation