【问题标题】:Incorrect Permissions when GET https://graph.microsoft.com/beta/education/classes/<ClassId>/membersGET https://graph.microsoft.com/beta/education/classes/<ClassId>/members 时的权限不正确
【发布时间】:2021-07-07 00:13:26
【问题描述】:

我正在尝试获取 MS Graph Education 中某个班级的成员列表。

我打这个电话:

https://graph.microsoft.com/beta/education/classes//members

但我收到此错误:

 {:code=>"AccessDenied", :message=>"Required claim values are not provided." }

我的应用程序配置为使用以下范围: EduAssignments.Read.All EduRoster.Read.All

我可以成功获得课程、作业,甚至老师。 https://graph.microsoft.com/beta/education/classes/ https://graph.microsoft.com/beta/education/classes//作业 https://graph.microsoft.com/beta/education/classes//老师

但不知何故它失败了: https://graph.microsoft.com/beta/education/classes//会员

我错过了什么?

【问题讨论】:

    标签: microsoft-graph-api microsoft-graph-edu


    【解决方案1】:

    我刚刚尝试了 API,它可以工作。在您的情况下,我看到的不同之处在于权限。有关允许哪些权限的详细信息,请参阅 API 文档 - https://docs.microsoft.com/en-us/graph/api/educationclass-list-members?view=graph-rest-1.0&tabs=http

    例如对于委托权限类型,您需要 EduRoster.ReadBasic,对于应用程序权限类型,您需要 EduRoster.Read.All、EduRoster.ReadWrite.All 以及 Member.Read.Hidden。在我的情况下,我正在查询我是一名教师的班级中的成员,并且我正在通过委托 EduRoster.ReadBasic 权限进行查询。我确实看到了班上的所有成员。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-11
      • 1970-01-01
      • 2015-03-13
      • 1970-01-01
      • 2020-07-30
      • 2014-12-23
      • 2014-12-24
      • 2017-06-18
      相关资源
      最近更新 更多