【问题标题】:Microsoft Graph API using nextLink on calendarView results in ErrorAccessDeniedMicrosoft Graph API 在 calendarView 上使用 nextLink 导致 ErrorAccessDenied
【发布时间】:2020-08-05 14:36:08
【问题描述】:

在 calendarView 上执行增量查询即使没有结果,我也会收到 nextLink。

GET: https://graph.microsoft.com/v1.0/users/..../calendars/..../calendarView/microsoft.graph.delta?startdatetime=2020-08-05T13:53:29.954Z&enddatetime=2021-08-05T13:53:30.151Z

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(event)",
    "@odata.nextLink": "https://graph.microsoft.com/v1.0/users/..../calendars/..../calendarView/microsoft.graph.delta?$skiptoken=b9658zLYx7ag_WbFCK2mQj8933PsHHOxsDcYSWymakIJAcGkjxjTZWz4SsQI4Gu31DvwMi0kzqDrERlfvpdkmD73Q-qUZHD5hyPpuGzImOd5KAY6SFhuYJTLnvcBRo31v2UIm9miIbAHDoaY4ImhmxMa8bmAUKOL....",
    "value": []
}

按照该链接获取 deltaLink 会导致 ErrorAccessDenied

GET: https://graph.microsoft.com/v1.0/users/..../calendars/..../calendarView/microsoft.graph.delta?$skiptoken=b9658zLYx7ag_WbFCK2mQj8933PsHHOxsDcYSWymakIJAcGkjxjTZWz4SsQI4Gu31DvwMi0kzqDrERlfvpdkmD73Q-qUZHD5hyPpuGzImOd5KAY6SFhuYJTLnvcBRo31v2UIm9miIbAHDoaY4ImhmxMa8bmAUKOL....

{
  "error": {
    "code": "ErrorAccessDenied",
    "message": "Access is denied. Check credentials and try again.",
    "innerError": {
      "date": "2020-08-05T14:06:37",
      "request-id": "fa8341c3-3eb0-4465-825e-6d7e80f532cd"
    }
  }
}

我有什么遗漏的吗? 如果没有要返回的对象,有没有办法在第一次请求时获取 deltaToken?

我尝试使用 msgraph-sdk-java 1.9.0 和使用 PostMan 直接调用来实现此流程。

【问题讨论】:

  • 在您发送 nextlink 请求时是否可能没有访问令牌和/或令牌已过期?
  • 我尝试生成一个新令牌并在调用 nextLink 时使用它,但没有任何改变...我认为是邮箱配置中的某些内容...

标签: microsoft-graph-api microsoft-graph-sdks microsoft-graph-calendar


【解决方案1】:

我又尝试了几个小时,但没有任何效果......直到我们的客户最终仔细检查了他的配置并从头开始重新分配了所有委托权限。

现在完美运行了......

【讨论】:

    猜你喜欢
    • 2023-03-03
    • 2022-08-26
    • 2018-06-24
    • 2022-12-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多