1
votes

I am trying to set webhook notification for SharePoint Online drive using MS Graph API. The subscription is setup. Whenever I make any change in the drive by adding/deleting a file I get a notification but the resourceData is null. Is this standard behaviour?

{"value":[
   {"subscriptionId":"XXX",
      "clientState":"secretClientValue",
      "tenantId":"XXX",
      "resource":"drives/<id>/root",
      "resourceData":null,
      "changeType":"updated",
      "subscriptionExpirationDateTime":"2019-01-22T18:23:45.9356913+00:00"
    }
  ]
}

Thank you for any suggestions.

1
i have the same issue. still hunting for an answer. i guess one option is to use the notification as a trigger to make a delta request as described here. docs.microsoft.com/en-us/graph/delta-query-overview.Nodoze

1 Answers

0
votes

Not all resources return resourceData within the notification itself, OneDrive is one of these.

OneDrive will return the following properties:

{
  "subscriptionId": "string",
  "expirationDateTime": "datetime",
  "resource": "relative url",
  "clientState": "string optional",
  "changeType": "updated"
}

You can find the spesific documentation for this entity here.