microsoft-graph-api - 从 Microsoft Graph 获取仅限应用范围的任务列表

标签 microsoft-graph-api

是否可以在服务应用中使用 Microsoft Graph API ( http://graph.microsoft.io/docs/api-reference/beta/api/task_list ) 检索任务列表?

我可以成功请求具有以下所有范围的 token :

  • 日历。阅读
  • 日历.ReadWrite
  • 通讯录。阅读
  • Directory.AccessAsUser.All
  • 目录.读取
  • 列出项目
  • 目录.读取.全部
  • 目录.ReadWrite.All
  • 电子邮件
  • 文件.读取
  • 文件.读取.选定
  • 群组.阅读.全部
  • Group.ReadWrite.All
  • 邮件.阅读
  • 邮件.发送
  • 注释.创建
  • 注释。阅读
  • 笔记.阅读.全部
  • Notes.ReadWrite.All
  • 离线访问
  • openid
  • 人物.阅读
  • 个人资料
  • 站点.阅读.全部
  • 任务.ReadWrite
  • 用户.阅读
  • 用户.阅读.全部
  • User.ReadBasic.All
  • 用户.ReadWrite
  • User.ReadWrite.All
  • 用户模拟

我能够获取用户、组、应用程序和其他实体的列表,但我对 tasksplans 端点的请求返回以下错误:

{
  "error": {
    "code": "UnknownError",
    "message": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n  <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>\r\n  <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n",
    "innerError": {
      "request-id": "d0d7d970-ff88-4af9-93d3-8b8d4acfabf0",
      "date": "2016-01-28T12:46:31"
    }
  }
}

我的期望是 Group.ReadWrite.All 是从 Directory.ReadWrite.All 继承为仅应用程序的,因此与 Task.ReadWrite 一起继承code> 我应该能够看到任务和计划。

是否还有其他必需的权限或我们遗漏的其他设置?

最佳答案

当前不支持在仅服务(仅应用程序)上下文中检索任务/计划。请改用用户委托(delegate)上下文(应用程序+用户)。

关于microsoft-graph-api - 从 Microsoft Graph 获取仅限应用范围的任务列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35062116/

相关文章:

azure - 微软图表。异常 SubscriptionCountReached 已达到限制 '1000'

office365api - 使用 Microsoft Graph API 处理外部 (internet/.ics) 日历 URL

outlook - 使用 Office js 获取约会对象的 iCalUId

sharepoint - 如何使用文件夹路径和 Microsoft Graph API 1.0 上传文件

c# - 通过 Microsoft.Graph 邀请用户会出现错误

azure - 使用 "Web API on-behalf-of flow"创建 Microsoft Graph Webhook 时访问 token 验证失败

excel - 查找工作表中的总行数和列数 - Microsoft Graph

javascript - Onenote API 创建页面

azure-active-directory - Microsoft Graph API 相当于 Set-UnifiedGroup HiddenFromExchangeClientsEnabled

javascript - Office插件开发: Connect to SharePoint site and get data