Goal: Create calendar events for an employee within a google workspace using a service account.
Details:
Google Calendar's api does not allow you to create events for a user via a service account. It requires you to add a claim to the JWT that appears as follows:
"sub: impersonated-user@gmail.com"
From what I can find it does not look like there is a way to include an extra claim within the request to the Calendar API which makes this impossible. Is there any way to add an extra field within the service account authentication that allows for impersonation?
Thank you, that would be great if you did. If it's not possible, I'd like to make a feature request since that would be very useful when trying to make workflows or apps that use google calendar.
The credentials that are in the link are the service account credentials. Based on google's docs I don't believe I can insert the field there unfortunately. Also, I was hoping to change which user I'm impersonating each call which would require it not to be in the credentials field and a parameter on the request.