Export groups

%3CLINGO-SUB%20id%3D%22lingo-sub-334233%22%20slang%3D%22en-US%22%3EExport%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-334233%22%20slang%3D%22en-US%22%3EHi%20all%2C%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20are%20best%20way%20to%20export%20Office%20365%20and%20azure%20active%20directory%20security%20groups%20in%20hybrid%20environment%3F%3CBR%20%2F%3E%3CBR%20%2F%3EMany%20thanks.%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-334233%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-334688%22%20slang%3D%22en-US%22%3ERe%3A%20Export%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-334688%22%20slang%3D%22en-US%22%3E%3CP%3EGetting%20the%20O365%20Security%20Groups%20members%20by%20below%20steps%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EStep%201%3A%26nbsp%3B%20Connect%20to%20O365%20online%20Services%20Using%20Powershell%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%23%3CEM%3Econnect-msolservice%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%23%20Get-MSOLGroup%20%22Security%20Group%20Name%22%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EStep%202%3A%20Copy%20the%20Group%20ID%26nbsp%3B%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EStep%203%3A%20Exporting%20the%20users%20from%20the%20Security%20Group%20running%20following%20command%20in%20Powershell%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CI%3EGet-MsolGroupMember%20-groupObjectid%20%E2%80%98xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%E2%80%99%20%7C%20Select%20DisplayName%2CEmailAddress%2CGroupMemberType%20%7C%20Export-csv%20C%3A%5CDesktop%5CSecurityGroup.csv%20-notypeinformation%3C%2FI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-334507%22%20slang%3D%22en-US%22%3ERe%3A%20Export%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-334507%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20in%20Hybrid%2C%20your%20groups%20should%20already%20be%20synchronized%20to%20Azure%20AD.%20But%20in%20any%20case%2C%20if%20you%20are%20looking%20for%20an%20easy%20way%20to%20export%20that%20information%2C%20just%20use%20PowerShell%20(Get-ADGroup%2FGet-AzureADGroup).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-334269%22%20slang%3D%22en-US%22%3ERe%3A%20Export%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-334269%22%20slang%3D%22en-US%22%3EIt%20really%20depends%20on%20what%20you%20need%20to%20do%20here%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-334238%22%20slang%3D%22en-US%22%3ERe%3A%20Export%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-334238%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20are%20you%20trying%20to%20accomplish!%20Please%20explain%20what%20you%20mean%20in%20a%20little%20more%20detail%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%2F%20Adam%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Contributor
Hi all,

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

Many thanks.
4 Replies
Highlighted

Hi!

 

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

 

/ Adam

Highlighted
It really depends on what you need to do here
Highlighted

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).

Highlighted

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