taers232c / GAMADV-XTD3

Command line tool to manage Google Workspace
703 stars 87 forks source link

Resource calendar with no users errors out changing domain permissions #316

Closed gns-jdaniel closed 2 months ago

gns-jdaniel commented 1 year ago

I'm using gam to configure the permissions for a bunch of Google Workspace resource (building/room) calendars.

I've noticed that if I try to change the permissions for the domain while there are no other user ACLs, the command times out:

gam calendar myresourcecalendarname@resource.calendar.google.com update acls reader domain:example.com
Calendar: myresourcecalendarname@resource.calendar.google.com, Update 1 Calendar ACL
Temporary error: internalError - Internal error encountered., Backing off: 16 seconds, Retry: 4/10
Temporary error: internalError - Internal error encountered., Backing off: 32 seconds, Retry: 5/10
Temporary error: internalError - Internal error encountered., Backing off: 60 seconds, Retry: 6/10
^C

HOWEVER, if I first add a user:

gam calendar myresourcecalendarname@resource.calendar.google.com add acls owner bookings@example.com sendnotifications false
gam user bookings@example.com add calendar myresourcecalendarname@resource.calendar.google.com selected true

AND THEN run the same command as before: gam calendar myresourcecalendarname@resource.calendar.google.com update acls reader domain:example.com then everything works perfectly. No extra user? can't change domain permissions. Extra user? no problem changing domain permissions. This is reproducible, with different resource calendars, at different times of the day.

Dakire commented 5 months ago

I also have the same error :

gam calendar "xxx@subdomain.xx" update acls freebusyreader domain:domain.xx Calendar: xxx@subdomain.xx, Update 1 Calendar ACL Temporary error: internalError - Internal error encountered., Backing off: 16 seconds, Retry: 4/10 Temporary error: internalError - Internal error encountered., Backing off: 32 seconds, Retry: 5/10 Temporary error: internalError - Internal error encountered., Backing off: 60 seconds, Retry: 6/10 Temporary error: internalError - Internal error encountered., Backing off: 60 seconds, Retry: 7/10 Temporary error: internalError - Internal error encountered., Backing off: 60 seconds, Retry: 8/10 Temporary error: internalError - Internal error encountered., Backing off: 60 seconds, Retry: 9/10

ERROR: 500: internalError - Internal error encountered.

I have more than 700 users to do, has anyone found a solution ?