Not able to create webhook subsciption for "create calendar"

Agami Technologies 40 Reputation points
2024-06-06T09:01:32.18+00:00

We are unable to create a webhook subscription for the creation of new calendars, as we are receiving an error response for the provided request body.

API: https://graph.microsoft.com/v1.0/subscriptions

Request Body

{
    changeType: "created,updated,deleted",
    notificationUrl: "https://90f7-49-14-113-152.ngrok-free.app/email-api/webhooks/azure",
    resource: "me/calendars",
    expirationDateTime: "2024-06-06T18:23:45.9356913Z",
    clientState: "secretClientValue"
}

Response Body

{
    "error": {
        "code": "ExtensionError",
        "message": "Operation: Create; Exception: [Status Code: BadRequest; Reason: Subscribing to folder hierarchy for Created event is not allowed.]",
        "innerError": {
            "date": "2024-06-06T08:53:18",
            "request-id": "af1fd2a4-8474-4683-9264-108fd8e08e5b",
            "client-request-id": "af1fd2a4-8474-4683-9264-108fd8e08e5b"
        }
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,124 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 39,101 Reputation points
    2024-06-06T10:48:50.8966667+00:00

    Hi @Agami Technologies

    Creating subscriptions for calendars is not yet supported, only for calendar events.

    The following are valid values for the resource property of the subscription:

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


0 additional answers

Sort by: Most helpful