How do I add management privilege to ALL calendars across domain in bulk for service account?

Hi Forum,

I have a service account I have built for a third party workspace management service that requires read and write privilege to every room and desk resource I have in my domain. As root admin, I know I can go calendar by calendar and manually add this service account to each respective calendar resource, how would I do this in bulk for 200+ resources and hopefully in perpetuity?

Cheers,

Ham

Solved Solved
1 12 2,633
2 ACCEPTED SOLUTIONS

You can do this with the free, open source, command-line, indispensable GAM tool. Check out:

for more details.

Hope that helps,

Ian

View solution in original post

@ham_the_admin Please find the below solution from a gam expert:

Advanced GAM solution:

 

# Get a list of resources, use a filter if desired: https://developers.google.com/admin-sdk/directory/reference/rest/v1/resources.calendars/list

gam redirect csv ./Resources.csv  print resources

# Inspect Resources.csv, delete any rows that shouldn't be included

# Replace us...@domain.com with actual value

gam redirect stdout ./AddResourceACLs.txt multiprocess redirect stderr stdout csv ./Resources.csv gam resource "~resourceId" create calendaracls editor user:us...@domain.com

# Inspect AddResourceACLs.txt

Add this to the end of the create calendaracls line: sendnotifications false
This eliminates 200+ emails.

View solution in original post

12 REPLIES 12
Top Labels in this Space
Top Solution Authors