Export groups

Iron Contributor
Hi all,

What are best way to export Office 365 and azure active directory security groups in hybrid environment?

Many thanks.
4 Replies

Hi!

 

What are you trying to accomplish! Please explain what you mean in a little more detail

 

/ Adam

It really depends on what you need to do here

If you are in Hybrid, your groups should already be synchronized to Azure AD. But in any case, if you are looking for an easy way to export that information, just use PowerShell (Get-ADGroup/Get-AzureADGroup).

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