从具有仅限应用范围的 Microsoft Graph 获取任务列表



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

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

  • 日历.读取
  • 日历.读写
  • 联系人.阅读
  • Directory.AccessAsUser.All
  • 目录.读取
  • 列表项
  • 目录.读取.全部
  • 目录.读写.全部
  • 电子邮件
  • 文件.读取
  • 文件.读取.选定
  • 组.读.全部
  • 组.读写.全部
  • 邮件阅读
  • 邮件发送
  • 注释.创建
  • 注释.阅读
  • 注释.阅读.全部
  • Notes.ReadWrite.All
  • offline_access
  • 开放ID
  • 人物阅读
  • 轮廓
  • 网站.阅读.全部
  • 任务.读写
  • 用户.阅读
  • 用户.阅读.全部
  • User.ReadBasic.All
  • 用户.读写
  • User.ReadWrite.All
  • user_impersonation

我能够获取用户、组、应用程序和其他实体的列表,但我对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">rn<html xmlns="http://www.w3.org/1999/xhtml">rn<head>rn<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>rn<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>rn<style type="text/css">rn<!--rnbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}rnfieldset{padding:0 15px 10px 15px;} rnh1{font-size:2.4em;margin:0;color:#FFF;}rnh2{font-size:1.7em;margin:0;color:#CC0000;} rnh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} rn#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;rnbackground-color:#555555;}rn#content{margin:0 0 0 2%;position:relative;}rn.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}rn-->rn</style>rn</head>rn<body>rn<div id="header"><h1>Server Error</h1></div>rn<div id="content">rn <div class="content-container"><fieldset>rn  <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>rn  <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>rn </fieldset></div>rn</div>rn</body>rn</html>rn",
    "innerError": {
      "request-id": "d0d7d970-ff88-4af9-93d3-8b8d4acfabf0",
      "date": "2016-01-28T12:46:31"
    }
  }
}

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

是否有其他必需的权限或我们错过的其他设置?

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

相关内容

最新更新