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

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

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

{"@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

这两个都存在 Headers :

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

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

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

(注意,如果从URL的末尾删除“/ plans”,它会返回一个有效的响应 . 如果该组不包含任何计划,它似乎也可以工作)