Outlook events webhook issue (can't get the hook)

Copper Contributor

Hello,

I am developing service that receive Calendar Webhooks when event are registered or modified in Outlook via MS365 Graph API using PHP.
Currently, I can't receiving webhooks for some mailboxes.
When I delete the subscription and request again, there is no error in the response.

When I add a resource mailbox to event as a Location or Participant, I confirmed the event was created in Resource calendar properly in Outlook but I didn't receive any hooks for that particular resource mailbox.
(Not all mailboxes are unable to receive hooks, some are receiving hooks normally.)
I'm wondering why I can't get the hooks, and how to fix it.

Thanks.

I am following the steps below to subscribe, request, and delete.


$subscriptions = $graph->createRequest("GET", "/subscriptions")
->setReturnType(Model\Subscription::class)
->execute();

$subscribe = $graph->createRequest("POST", "/subscriptions")
->attachBody([
"changeType" => "created,updated,deleted",
"notificationUrl" => OUTLOOK_NOTIFICATION_REDIRECT_URI,
"resource" => "/users/{$calendarId}/events",// messages
"expirationDateTime" => $expirationDateTime,
"clientState" => "SecretClientState"
])
->setReturnType(Model\Subscription::class)
->execute();

$graph->createRequest("DELETE", "/subscriptions/{$id}")->execute();
0 Replies