/ groups / {id} / planner / plans with odata.metadata = full返回Bad Request

时间:2017-05-22 17:07:24

标签: microsoft-graph

对以下Graph端点(以及其他一些端点)的请求导致错误:

https://graph.microsoft.com/v1.0/groups/<id>/planner/plans

400错误请求 - (位置174处的意外令牌LEFT BRACE({)。)

{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.plannerPlan)","@odata.count":1,"value":[{"@odata.type":"#microsoft.graph.plannerPlan"{
  "error": {
    "code": "BadRequest",
    "message": "When writing a JSON response, a user model must be specified and the entity set and entity type must be passed to the ODataMessageWriter.CreateODataEntryWriter method or the ODataFeedAndEntrySerializationInfo must be set on the ODataEntry or ODataFeed that is being written.",
    "innerError": {
      "request-id": "e6824e3f-9519-4f2a-a68e-968bc4d16c6b",
      "date": "2017-05-22T16:52:22"
    }
  }
}

另一方面,此URL工作正常。

https://graph.microsoft.com/v1.0/groups/<id>/planner

这两个都存在标题:

Accept: application/json;odata.metadata=full
Authorization: Bearer <AccessToken>

看起来odata.metadata = full导致第一个请求失败。

使用。可以看到错误 Graph Explorer并仅设置请求标头
接受:application / json; odata.metadata = full
(这使用了一个示例帐户,因此不需要Authorization标头。)

(注意如果&#34; / plans&#34;从URL的末尾被删除,则返回有效的响应。如果该组不包含计划,它似乎也有效)

0 个答案:

没有答案