We have a setup where a Google Administrator will integrate once to their Workspace to allow Google Calendar integration with their whole workspace, allowing all users to create/update events across their workspace, without having to get each user to integrate themselves.
https://developers.google.com/calendar/api/v3/reference/events/insert
Scope we using https://www.googleapis.com/auth/calendar.events
So we create events on in users calendars, by passing in a Calendar ID for the user, and then will add attendees to the event.
Everything works normal, except when using the API endpoint to create an event, we are having 1 major problem where the From address, is ok but the Reply To address in the email sent to attendees for some reason always is the email of the original admin who added the integration, so people are doing email reply all to the to calendar invitations and end up also sending the emails to the admin.
We have tried everything possible in API , but it reply to address is always the admin email, and we expect it to be the same as the from: email
Based on the details you shared, I would guess that the credentials the app is using is OAuth 2 client ID
. I did some tests, as an admin I created the event and added in the request the other user's email address as the organizer but got the same result you are reporting.
I could not find in the official documentation why this happens, I would say it is expected as I tested creating the event manually in the Google Calendar UI and got the same result. You can submit your feedback about this behavior here.
The only solution I found is doing impersonation with a service account, this means that the service account acts on behalf of the user (e.g. any user in the organization) and when the app creates events in Google Calendar, it is equivalent to when the user itself creates the event.
To set up impersonation you need to:
Create a service account and create a service account key in the Google Cloud console.
Authorize all the scopes the service account needs in your Admin console:
Modify your code to authenticate using the service account key.
I don't know what programming language you're using but I did this test with Python and the reply-to
address matches with the from
email address, if you need the sample let me know but you can also find samples with other programming language in the documentation below.