如何检索列表分配返回的引用实体

How to retrieve referenced entities returned by List Assignments

我正在调用 Microsoft Graph 中的列表分配端点。它 returns 一个 类 的数组,其中一个 类 如下所示。

如何解压引用的实体 microsoft.graph.educationAssignmentClassRecipient 以获取收件人列表?

{
    "classId": "bef6024d-c51d-4c2d-9c4c-4e290581e7b4",
    "displayName": "Teleschool Week 5 Formative Grade",
    "closeDateTime": null,
    "dueDateTime": "2020-04-28T03:59:59Z",
    "assignDateTime": null,
    "assignedDateTime": "2020-04-24T15:51:00.8911402Z",
    "allowLateSubmissions": true,
    "createdDateTime": "2020-04-24T15:50:39.9443371Z",
    "lastModifiedDateTime": "2020-04-24T15:51:03.7407937Z",
    "allowStudentsToAddResourcesToSubmission": true,
    "status": "assigned",
    "id": "66e4a8f8-42ee-49e0-9503-e24a49be6908",
    "instructions": {
        "content": "",
        "contentType": "text"
    },
    "grading": {
        "@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
        "maxPoints": 100
    },
    "assignTo": {
        "@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
    }

educationAssignmentClassRecipient {从文档中粘贴}:

Used inside the assignment.assignTo property. When set to class recipient, every student in the class will receive a submission object when the assignment is published.

This resource is a subclass of educationAssignmentRecipient.

对于分发给整个 class 的作业,它将包含 classRecipient 数据类型。

对于class收件人,我们不包含完整的用户 ID 列表。但是您可以查询 ~/groups/{classId}/members API 以获取成员列表或确切地查看哪些用户被分配了该任务,您可以查询 ~/assignments/{id}/submissions 列表,其中每个提交将包含 recipient/userId 属性.

对于有选择地分发给部分学生的作业,它将包含@odata.type: IndividualRecipient 和带有学生用户 ID 的收件人数组。