Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,289 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We're using MS Graph Subscription for events via webhooks. We're only interested in reminder events and want to ignore all other event notifications like create / update of a calendar event.
Subscription subscription = new Subscription();
subscription.setChangeType("created,updated,deleted");
subscription.setNotificationUrl(notificationUrl);
subscription.setResource("/me/events?$select=id,subject,start,end,webLink,onlineMeetingUrl,reminderMinutesBeforeStart");
subscription.setExpirationDateTime(java.time.OffsetDateTime.now().plusDays(3));
subscription.setClientState(CLIENT_STATE);
subscription.setEncryptionCertificateId(certificateStore.getCertificateId());
subscription.setEncryptionCertificate(certificateStore.getBase64EncodedCertificate());
subscription.setIncludeResourceData(true);
subscription = graphClient.subscriptions()
.post(subscription);