I subscribed the calendar events notification through microsoft graph api ,but only receive created and deleted changes without updated changes

zhangqi 0 Reputation points
2023-09-07T07:33:24.0733333+00:00

I subscribed the calendar events notification through microsoft graph api ,but only receive created and deleted changes without updated changes。

                String calendarId = primaryCalendarOptional.get().id;

                String notifyUrl = graphProperties.getNotifyUrl();

                String resource = "/users/" + email + "/calendars/" + calendarId + "/events";

                List<String> changeType = ImmutableList.of("updated", "deleted", "created");

                long subExp = System.currentTimeMillis() + SUB_DURATION;

                Subscription subscription = new Subscription();

                subscription.changeType = String.join(",", changeType);

                subscription.notificationUrl = notifyUrl;

                subscription.resource = resource;

                subscription.expirationDateTime = OffsetDateTime.ofInstant(Instant.ofEpochMilli(subExp), ZoneId.systemDefault());

                subscription.latestSupportedTlsVersion = "v1_2";

                Subscription subscriptionEvent = null;

                try {

                    subscriptionEvent = graphServiceClient.subscriptions()

                            .buildRequest()

                            .post(subscription);

                } catch (ClientException e) {

                    log.error("subscription failed: {}", e.getMessage());

                    throw new RuntimeException(e);

                }

I can't receive updated changes, when i use api to create a event, only receives create events,usually, when you create a event,then there will be a created change and several updated changesimage

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,487 questions
0 comments No comments
{count} votes