Share via

calling https://graph.microsoft.com/v1.0/subscriptions api to get notification on file update

Omkar Tambe 0 Reputation points
2024-08-06T07:57:51.9233333+00:00

i am trying to get notification for specific file
i am adding resource path as sites/${siteId}/drives/${driveId}/root:/path/foldername;
but getting error as is not supported.
sharing whole error

{
    "error": {
        "code": "InvalidRequest",
        "message": "resource 'sites/zycusitis.sharepoint.com,1d9e3831-f959-4910-99e1-8fc2d2922681,10b34443-c70c-40bb-8ab9-e3b8a58f153c/drives/b!MTieHVn5EEmZ4Y_C0pImgUNEsxAMx7tAirnjuKWPFTxUmO287bDgSqWGWcTmt2gM/root:/Shared%20Documents/SharepointTesting' is not supported.",
        "innerError": {
            "date": "2024-08-06T07:57:16",
            "request-id": "994f275e-e284-4d93-a503-f726ec252535",
            "client-request-id": "994f275e-e284-4d93-a503-f726ec252535"
        }
    }
}
Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,456 Reputation points
    2024-08-06T09:06:09.9233333+00:00

    Hi @Omkar Tambe

    You can only subscribe to the root folder, not to a specific driveItem instance.

    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.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.