为什么我无法从 Microsoft Graph Unified API 获取 'Tasks'?

Why Can't I GET 'Tasks' from Microsoft Graph Unified API?

我正在尝试构建一个应用程序演示,它将在 Outlook 中为用户创建任务。我一直在尝试使用 Microsoft Graph API,但我无法获取有关任务的数据。

我正在使用 Postman(google 扩展应用程序)发送查询,并且我提供了一个有效的访问令牌。

GET https://graph.microsoft.com/beta/me/tasks

响应是:

  {
  "error": {
    "code": "UnknownError",
    "message": "Users must consent to all of the following scopes: Group.ReadWrite.All,Tasks.ReadWrite",
    "innerError": {
      "request-id": "f8595b76-1ad9-4ad3-af52-2e1028f01879",
      "date": "2015-12-08T18:55:02"
    }
  }
}

为什么我无法访问我的用户的任务?在服务管理器 (Visual Studio) 中,我检查了所有权限。

作为用户,我允许应用程序拥有这些权限。我没有 'revoke' 权限。

请使用 Azure 管理门户 (https://manage.windowsazure.com) 为您的应用配置所需的委派权限。

您的请求在令牌中具有以下范围:Calendars.ReadWrite Contacts.ReadWrite Mail.ReadWrite Mail.Send MyFiles.Write User.Read。它没有此 API 调用所需的 Group.ReadWrite.All 和 Tasks.ReadWrite 范围。

另请注意,Microsoft Graph API 公开的任务是 Office 365 Planner 任务(参见 https://tasks.office.com),而不是 Outlook 任务。

有outlook测试版见 https://msdn.microsoft.com/en-us/office/office365/api/task-rest-operations

上的 Outlook 任务 REST APi