Microsoft Graph returns "Internal Server Error" 根据要求?

Microsoft Graph returns "Internal Server Error" on request?

我正在尝试通过 Microsoft Graph 获取我的 Microsoft Teams 作业。我提交了这个 GET 请求 https://graph.microsoft.com/beta/education/me/classes/{id}/assignments,如文档中所示,我的身份验证令牌是 header。但是,下面是我得到的回复。我正在使用 python 执行此操作,但是我也尝试从 Graph Explorer 中产生相同的结果。

{
"error": {
  "code": "InternalServerError",
  "message": "Object reference not set to an instance of an object.",
  "innerError": {
    "date": "2020-09-07T16:44:48",
    "request-id": "011086a0-9240-4896-9363-d403a1a0fb05"
    }
  }
}

有没有人有任何见解?这是 Microsoft 的问题吗?

您需要删除 /me。正确的 URI 是 https://graph.microsoft.com/beta/education/classes/{id}/assignments.

来自the documentation

POST https://graph.microsoft.com/beta/education/classes/11019/assignments
Content-type: application/json
Content-length: 279

{ 
  "dueDateTime": "2014-02-01T00:00:00Z",
  "displayName": "Midterm 1",
    "instructions":  {
      "contentType": "text",
      "content": "Read chapters 1 through 3"
    },
      "grading": {
        "@odata.type": "#microsoft.education.assignments.api.educationAssignmentPointsGradeType",
        "maxPoints": 100
      },
      "assignTo": {
        "@odata.type": "#microsoft.education.assignments.api.educationAssignmentClassRecipient"
      },
      "status":"draft",
      "allowStudentsToAddResourcesToSubmission": true
}