Change calendar sharing options for all calendars in a domain.

357 views
Skip to first unread message

Dustin Gleaton

unread,
Nov 30, 2021, 1:10:10 PM11/30/21
to GAM for Google Workspace
Hello Everyone,

Looking for a bit of guidance. We need a script or set of commands to change the share permissions for all calendars created. To be more specific, we know our client's users have set calendar settings to be open to the public. This happened because the admin did not control what the highest external sharing option was before the user started to create calendars. So, with that said, we need this script or command set to remedy this, and we could also use a command that prints all calendars and what permissions they have.

Thanks in advanced!

Cheers,
Dustin Gleaton

Ross Scroggs

unread,
Nov 30, 2021, 1:55:31 PM11/30/21
to google-ap...@googlegroups.com
Dustin,


Get ACLs for a user's primary calendar.

gam redirect csv UserCalendars.csv user us...@domain.com print calendaracls primary


Get ACLs for all users' primary calendars.

gam config auto_batch_min 1 redirect csv UserCalendars.csv multiprocess all users print calendaracls primary


Get ACLs for all calendars a user owns.

gam redirect csv UserCalendars.csv user us...@domain.com print calendaracls minaccessrole owner


Get ACLs for all calendars all users own.

gam config auto_batch_min 1 redirect csv UserCalendars.csv multiprocess all users print calendaracls minaccessrole owner


Delete public sharing

gam config csv_input_row_filter "id:regex:default" csv UserCalendars.csv gam user "~primaryEmail" delete calendaracls "~calendarId" "~role" "~scope.value"


Test


Ross


--
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/abae5a3e-8fe3-426c-8cf9-b1f6d99d5440n%40googlegroups.com.


--

Dustin Gleaton

unread,
Nov 30, 2021, 2:05:36 PM11/30/21
to GAM for Google Workspace
Ross,

You rock, thanks for the information!

Cheers,
Dustin Gleaton

Reply all
Reply to author
Forward
0 new messages