resourceData 对于 Sharepoint Online 的 microsoft graph API webhook 返回 null

问题描述 投票:0回答:2

我正在尝试使用 MS Graph API 为 SharePoint Online 驱动器设置 Webhook 通知。订阅已设置。每当我通过添加/删除文件对驱动器进行任何更改时,我都会收到通知,但资源数据为空。 这是标准行为吗?

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

感谢您的任何建议。

json microsoft-graph-api sharepoint-online
2个回答
0
投票

并非所有资源都会在通知本身内返回

resourceData
,OneDrive 就是其中之一。

OneDrive 将返回以下属性:

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

您可以在此处找到该实体的具体文档


0
投票

在有效负载中添加“includeResourceData”:true

© www.soinside.com 2019 - 2024. All rights reserved.