【问题标题】:Microsoft Graph Education API Method not allowed不允许使用 Microsoft Graph 教育 API 方法
【发布时间】:2020-05-21 03:31:44
【问题描述】:

当我尝试在图形资源管理器“https://graph.microsoft.com/v1.0/education/classes”中创建类时,请求如下。

{
    "description": "Class 9th Frist batch",
    "classCode": "9th-A",
    "displayName": "9th Class",
    "externalId": "11019",
    "externalName": "9th Class",
    "externalSource": "sis",
    "mailNickname": "fineartschool.net"
}

回复:

{
    "error": {
        "code": "MethodNotAllowed",
        "message": "Method not allowed.",
        "innerError": {
            "request-id": "7daf0b9c-165a-4c18-a2b9-b90a59d00cc6",
            "date": "2020-05-19T13:26:06"
        }
    }
}

我可以列出和创建日历和事件,但我不能创建或列出类。 谁能指导我我的帐户有什么问题?为什么我得到以上回应。如何使用教育 API?

【问题讨论】:

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


    【解决方案1】:

    这里的问题是 Graph Explorer 使用委托范围,但 Create educationClass 端点只接受应用范围:

    • 委派(工作或学校帐户):不支持。
    • 委派(个人 Microsoft 帐户):不支持。
    • 申请:EduRoster.ReadWrite.All

    由于不支持委托范围,您将无法使用 Graph Explore 创建类。您将需要使用自己的代码/应用程序来请求 EduRoster.ReadWrite.All 范围并使用 Client Credentials OAuth Grant 来获取您的令牌。

    【讨论】:

      猜你喜欢
      • 2020-07-03
      • 1970-01-01
      • 2022-01-18
      • 1970-01-01
      • 1970-01-01
      • 2015-02-03
      • 2014-10-13
      • 2014-06-11
      • 2014-08-21
      相关资源
      最近更新 更多