问题
I tried to create a google calendar event with attendees, and it didn't work (threw an error of domain wide delegation).
I activated the domain wide delegation and rerun the script, ending with the same error,
Which lead me to wonder, does the Domain Wide Delegation require a G-Suite account?
- I'm using a service account
- Without the Attendees the scripts works fine
- The service account has a calendar shared to it, and the service account has modify permissions to this calendar (events without attendees are created successfully)
- I want to create the events on this calendar and add attendees to the event (If i will be able to create events to a calendar that's not shared with the service account it would be preferred)
回答1:
does the Domain Wide Delegation require a G-Suite account?
Domain-wide delegation means that you use a service-account that acts on behalf on users in your (GSuite!) domain. If you do not have a GSuite account, you cannot have a GSuite domain and consequently no users in this domain. See Perform G Suite Domain-Wide Delegation of Authority.
Without the Attendees the scripts works fine
This issue has been reported on Google's public issue tracker. Basically, right now there there restrictions for creation of events with attendees with a service account, especially when the attendees are outside of your domain. The current workaround would be not to use a service account for creation of events with attendees.
I hope this information is useful for you!
来源:https://stackoverflow.com/questions/60781022/creating-calendar-event-with-attendees