Auditing Security Settings for Every Google Group

152 views
Skip to first unread message

Dale Courtney

unread,
Feb 24, 2023, 12:00:33 PM2/24/23
to GAM for G Suite
I'm running GAMADV-XTD3 6.42.10

I need to do an audit on the security settings for all 250+ Google Groups. 

Is there a GAM command that will return the security settings for each group? 

Something like this: 

#!/bin/bash

# Get the list of all groups
/Users/dale.courtney/bin/gamadv-xtd3/gam print groups > groups.txt

# Loop through each group and get its security settings
while read -r group; do
    echo "Getting security settings for $group"
    if /Users/dale.courtney/bin/gamadv-xtd3/gam print group $group security > /dev/null 2>&1; then
        /Users/dale.courtney/bin/gamadv-xtd3/gam print group $group security > ~/Downloads/${group}_security.txt
    else
        echo "No security settings for $group"
    fi
done < groups.txt


best,

Dale Courtney
IT Manager

232 N. Almon St. | Moscow, ID | 83843

Jay Lee

unread,
Feb 24, 2023, 12:11:35 PM2/24/23
to google-ap...@googlegroups.com
gam print groups settings

should give you what you need.

Jay Lee


--
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/CAG56vfNiCmwe7fj7Nbozd_W3R9HzMjLJOwfNfbirvx4QxujGqw%40mail.gmail.com.

Dale Courtney

unread,
Feb 24, 2023, 12:13:56 PM2/24/23
to google-ap...@googlegroups.com
Jay: Thank you so much! 

best,
Dale


Dale Courtney

unread,
Feb 24, 2023, 12:21:21 PM2/24/23
to google-ap...@googlegroups.com
Quick follow-up question. 

In Google Admin Console, we have  Access Settings > Who Can View Conversations. 

That's the field I need to audit. 

However, gam print groups settings does not provide that column as an output. 

Does anyone know if the "whoCanViewGroup" column that says "ALL_IN_DOMAIN_CAN_VIEW" means all in domain can view conversations? 

Thanks. 

best,
Dale

Ross Scroggs

unread,
Feb 24, 2023, 12:25:22 PM2/24/23
to google-ap...@googlegroups.com

Dale Courtney

unread,
Feb 24, 2023, 12:50:34 PM2/24/23
to google-ap...@googlegroups.com
Thanks, Ross. That is exactly what I was looking for. 

I cannot tell you how grateful I am to you and Jay for creating GAM. In an hour I was able to audit all 244 of my groups and fix any incorrect security settings. Manually, it would have taken days. 

best,
Dale


Reply all
Reply to author
Forward
0 new messages