Bulk export all groups with members

367 views
Skip to first unread message

Gladys Francisco

unread,
Apr 15, 2024, 6:04:34 AM4/15/24
to GAM for Google Workspace
How can I extract all groups with members on it . 

✉ Kevin Melillo

unread,
Apr 15, 2024, 7:40:50 AM4/15/24
to google-ap...@googlegroups.com
I may be missing what you are asking, but the command you seem to be requesting is one of the examples in the documentation on the website.  Please see the following:
gam print groups name description admincreated id aliases members owners managers settings > groups.csv

If you only need the members, managers, and owners, then you can reduce the report data a bit by only including:
gam print groups members owners managers > groups.csv

On Mon, Apr 15, 2024 at 6:04 AM Gladys Francisco <gbfra...@alphaland.com.ph> wrote:
How can I extract all groups with members on it . 

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/6c5ab2c1-6a67-4165-8498-76fcd4bf06aen%40googlegroups.com.

Gladys Francisco

unread,
Apr 15, 2024, 7:54:19 AM4/15/24
to google-ap...@googlegroups.com
Let’s say I have about 300 groups, how can i extract them? 


You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/II6R5BrmTnA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAKM%3DboYy8Y%3Dx2%3D73bQJzjKRvdtN5Kbnk%3Devc2_O%3DVdxZ%3DxXFgQ%40mail.gmail.com.

✉ Kevin Melillo

unread,
Apr 15, 2024, 8:02:40 AM4/15/24
to google-ap...@googlegroups.com
Please see the previous email.  It will extract the groups to a CSV file.  If instead you need them to go to a Google sheet, you can end the command with todrive, like this: 
gam print groups members owners managers todrive

Ross Scroggs

unread,
Apr 15, 2024, 10:56:20 AM4/15/24
to google-ap...@googlegroups.com

# You can get group members in two forms:                                                                                                                                                                                                    


#### Get one row per group, member email addresses for each role are space separated                                                                                                                                                         

# See: https://github.com/taers232c/GAMADV-XTD3/wiki/Groups#display-information-about-selected-groups                                                                                                                                        


# Specific group                                                                                                                                                                                                                             

$ gam print groups select test...@domain.com members managers owners

Getting Group test...@domain.com

Getting Members, Managers, Owners for test...@domain.com

Got 4 Members, Managers, Owners for test...@domain.com: ad...@domain.com - test...@domain.com

email,MembersCount,Members,ManagersCount,Managers,OwnersCount,Owners

test...@domain.com,2,tests...@domain.com test...@domain.com,1,te...@domain.com,1,ad...@domain.com


# All groups                                                                                                                                                                                                                                 

$ gam print groups members managers owners


#### Get one row per group/member combination                                                                                                                                                                                                

# See: https://github.com/taers232c/GAMADV-XTD3/wiki/Groups-Membership#display-group-membership-in-csv-format                                                                                                                                


# Specific group                                                                                                                                                                                                                             

$ gam print group-members group test...@domain.com

Getting all Members, Managers, Owners for test...@domain.com

Got 4 Members, Managers, Owners for test...@domain.com...

group,type,role,id,status,email

test...@domain.com,USER,OWNER,108599625550854546019,ACTIVE,ad...@domain.com

test...@domain.com,USER,MANAGER,107814323263002677058,ACTIVE,te...@domain.com

test...@domain.com,USER,MEMBER,108956175887313190595,ACTIVE,tests...@domain.com

test...@domain.com,USER,MEMBER,103733368977182650829,,test...@domain.com



# All groups                                                                                                                                                                                                                                 

$ gam print group-members


Ross
----
Ross Scroggs



Reply all
Reply to author
Forward
0 new messages