I am writing a calendar integration and using the Google Calendar api and Outlook Graph api to sync calendar events. I am receiving webhooks as changes are made to events, so it is important that events are identical across calendar providers.
When I update the event attendees on a Google event however, an event update is not sent to Outlook attendees. The result is that Outlook attendees do not have an accurate attendee list.
If I change the Title/Description/Time, Google sends an event update and the Google and Outlook events get synced (the Outlook event is updated with the correct attendee list).
I have tried updating fields the user doesn't see (ex: sequence, extended properties) in hopes that the change would trigger an event update from Google but that doesn't seem to work.
Has anyone found a way to trigger a Google event update when attendees are added or removed?
UPDATE: For Outlook users, I create a subscription (using the graph SDK) to each user’s calendar:
var graphClient = await MicrosoftAuthenticationProvider.GetGraphClient(CALENDAR_CLIENT_ID, CALENDAR_CLIENT_SECRET, CALENDAR_REDIRECT_URI, CALENDAR_ACCESS_SCOPES, RefreshToken).ConfigureAwait(false);
var tmpSubscription = new Subscription
{
ChangeType = WEBHOOK_SUBSCRIPTION_CHANGETYPE,
NotificationUrl = WEBHOOK_NOTIFICATION_ENDPOINT,
Resource = WEBHOOK_EVENT_RESOURCE_NAME,
ExpirationDateTime = maxSubscriptionLength,
ClientState = clientState
};
var subscription = await graphClient.Subscriptions
.Request()
.AddAsync(tmpSubscription)
.ConfigureAwait(false);
When an Outlook event is updated, my webhook notification endpoint receives a notification from Outlook. This happens successfully when I edit the summary, description, start or end of an event in Google. It does not happen when I add or remove attendees.
To replicate: create an event in Google that has an attendee that uses Outlook. You will see the event in Outlook. Add another attendee to the Google event. Google does not send Outlook an update email (the way it does if the title/time/description changes). The Google and Outlook events attendees are now different.
I am receiving webhooks as changes are made to events? How did you set that, via push notifications? Can you provide the corresponding code? - Iamblichus