Google Workspace – useful GAM commands for calendar privacy

I just had a problem where Google Calendar’s default privacy setting was changed to “freeBusy” but didn’t replicate to all users.

Looking into it, the privacy change is only applied if the user hasn’t changed their calendar’s default settings. It’s not clear what settings influence this.

Anyway, we needed to use GAM to fix the remaining calendars. Here are the commands we used, and i hope these can be useful to you ^^

1 – This command gets the sharing setting within the domain for the default calendar of all users:

gam print users | gam csv - gam calendar ~primaryEmail showacl | findstr "domain:<YOUR DOMAIN HERE>" > out.txt

2 – This command changes the setting to “freeBusy” so that other users can only see free slots, not details about events:

gam calendar <calendar email> update freebusy domain

In our case we only had 20 or so users needing to be migrated so i just used a bit of manual automation. However, if you have a lot of users, you can just use the “gam csv” preface and feed the users you got in step 1 via a CSV file after massaging the output a little bit.

More information is available here: https://github.com/jay0lee/GAM/wiki/BulkOperations

Hope this helps!

Views: 61

Leave a Reply

Your email address will not be published. Required fields are marked *