名前空間: microsoft.graph
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
educationAssignment オブジェクトの一覧を取得します。 この操作を実行できるのは、アプリケーションのアクセス許可を持つ教師、学生、アプリケーションだけです。
教師またはアプリケーションのアクセス許可を持って実行しているアプリケーションは、クラスのすべての割り当てオブジェクトを表示できます。 学生は、割り当てられている課題のみを表示できます。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス | 米国政府機関 L4 | 米国政府機関 L5 (DOD) | 21Vianet が運営する中国 |
|---|---|---|---|
| ✅ | ❌ | ❌ | ❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。 アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 | 最小特権アクセス許可 | より高い特権のアクセス許可 |
|---|---|---|
| 委任 (職場または学校のアカウント) | EduAssignments.ReadBasic | EduAssignments.Read、EduAssignments.ReadWrite、EduAssignments.ReadWriteBasic |
| 委任 (個人用 Microsoft アカウント) | サポートされていません。 | サポートされていません。 |
| アプリケーション | EduAssignments.ReadBasic.All | EduAssignments.Read.All、EduAssignments.ReadWrite.All、EduAssignments.ReadWriteBasic.All |
HTTP 要求
GET /education/classes/{id}/assignments
オプションのクエリ パラメーター
このメソッドは、応答のカスタマイズに役立つ $expandOData クエリ パラメーター をサポートします。
folloing $expand オプションは、前のすべてのオプションを含む、 categories、 resources、 rubric、 submissions、および *で使用できます。
すべての プロパティ は、クエリ パラメーターの $filter と $orderbyでサポートされています。
要求ヘッダー
| ヘッダー | 値 |
|---|---|
| Authorization | ベアラー {token}。 必須です。 認証と認可についての詳細をご覧ください。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK 応答コードと、応答本文の educationAssignment オブジェクトのコレクションを返します。
例
例 1: 割り当てを取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('ce2cd7da-e41b-4e66-8390-c9251e4c3a40')/assignments",
"@odata.nextLink": "https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments?$skiptoken=MyZRVkZCUVVGQlFVRlNRVUZCUVVGQlFVRkJRWGxCUVVGQlNDczVLMmRqVWpsWWEyVlhWV3BwVkVrd09EUk1aejA5",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET education/classes('<guid>')/assignments?$select=addedStudentAction,addToCalendarAction",
"value": [
{
"classId": "ce2cd7da-e41b-4e66-8390-c9251e4c3a40",
"displayName": "New assignment",
"closeDateTime": null,
"dueDateTime": "2025-05-09T00:00:00Z",
"assignDateTime": null,
"assignedDateTime": null,
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"feedbackResourcesFolderUrl": null,
"createdDateTime": "2025-05-07T18:17:06.2831309Z",
"lastModifiedDateTime": "2025-05-07T18:17:06.4526679Z",
"allowStudentsToAddResourcesToSubmission": false,
"status": "draft",
"notificationChannelUrl": null,
"webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%22ce2cd7da-e41b-4e66-8390-c9251e4c3a40%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%22f5e60dc1-d084-4ca4-a3b4-025f11023059%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addToCalendarAction": "none",
"addedStudentAction": "none",
"languageTag": "en-US",
"moduleUrl": null,
"id": "f5e60dc1-d084-4ca4-a3b4-025f11023059",
"grading": null,
"instructions": {
"content": null,
"contentType": "text"
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
}
}
]
}
例 2: $expand オプションを使用して割り当てを取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments?$expand=resources
応答
次の例は応答を示しています。 応答には、各割り当てのリソースの一覧が含まれます。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 344
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('ce2cd7da-e41b-4e66-8390-c9251e4c3a40')/assignments(resources())",
"@odata.nextLink": "https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments?$expand=resources&$skiptoken=MyZRVkZCUVVGQlFVRlNRVUZCUVVGQlFVRkJRWGxCUVVGQmRFY3lhVXgwV20xWVZYbDZOMHhqY1ZKckswMXBkejA5",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET education/classes('<guid>')/assignments?$select=addedStudentAction,addToCalendarAction",
"value": [
{
"classId": "ce2cd7da-e41b-4e66-8390-c9251e4c3a40",
"displayName": "New assignment",
"closeDateTime": null,
"dueDateTime": "2025-05-09T00:00:00Z",
"assignDateTime": null,
"assignedDateTime": null,
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"feedbackResourcesFolderUrl": null,
"createdDateTime": "2025-05-07T18:17:06.2831309Z",
"lastModifiedDateTime": "2025-05-07T18:17:06.4526679Z",
"allowStudentsToAddResourcesToSubmission": false,
"status": "draft",
"notificationChannelUrl": null,
"webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%22ce2cd7da-e41b-4e66-8390-c9251e4c3a40%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%22f5e60dc1-d084-4ca4-a3b4-025f11023059%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addToCalendarAction": "none",
"addedStudentAction": "none",
"languageTag": "en-US",
"moduleUrl": null,
"id": "f5e60dc1-d084-4ca4-a3b4-025f11023059",
"grading": null,
"instructions": {
"content": null,
"contentType": "text"
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"resources@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('ce2cd7da-e41b-4e66-8390-c9251e4c3a40')/assignments('f5e60dc1-d084-4ca4-a3b4-025f11023059')/resources",
"resources": []
}
]
}
例 3: $filter を使用して割り当てを取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments?$filter=status eq 'assigned'
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('ce2cd7da-e41b-4e66-8390-c9251e4c3a40')/assignments(resources())",
"@odata.nextLink": "https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments?$expand=resources&$skiptoken=MyZRVkZCUVVGQlFVRlNRVUZCUVVGQlFVRkJRWGxCUVVGQlozTk9VVEZCWmpCS01IRm5ZMHBzTVhGT0szY3JkejA5",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET education/classes('<guid>')/assignments?$select=addedStudentAction,addToCalendarAction",
"value": [
{
"classId": "ce2cd7da-e41b-4e66-8390-c9251e4c3a40",
"displayName": "New assignment",
"closeDateTime": null,
"dueDateTime": "2025-05-09T00:00:00Z",
"assignDateTime": null,
"assignedDateTime": null,
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"feedbackResourcesFolderUrl": null,
"createdDateTime": "2025-05-07T18:17:06.2831309Z",
"lastModifiedDateTime": "2025-05-07T18:17:06.4526679Z",
"allowStudentsToAddResourcesToSubmission": false,
"status": "assigned",
"notificationChannelUrl": null,
"webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%22ce2cd7da-e41b-4e66-8390-c9251e4c3a40%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%22f5e60dc1-d084-4ca4-a3b4-025f11023059%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addToCalendarAction": "none",
"addedStudentAction": "none",
"languageTag": "en-US",
"moduleUrl": null,
"id": "f5e60dc1-d084-4ca4-a3b4-025f11023059",
"grading": null,
"instructions": {
"content": null,
"contentType": "text"
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"resources@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('ce2cd7da-e41b-4e66-8390-c9251e4c3a40')/assignments('f5e60dc1-d084-4ca4-a3b4-025f11023059')/resources",
"resources": []
}
]
}
例 4: $orderby を使用して割り当てを取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments?$ordeby= id
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('ce2cd7da-e41b-4e66-8390-c9251e4c3a40')/assignments",
"@odata.nextLink": "https://graph.microsoft.com/beta/education/classes/ce2cd7da-e41b-4e66-8390-c9251e4c3a40/assignments?$filter=status+eq+%27assigned%27&$skiptoken=MyZRVkZCUVVGQlFVRlJkMEZCUVVGQlFVRkJRWGxCUVVGQllWbFdhVlF5UVdWcVZYbEZNRXB0TUhWVFRYUXpkejA5",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET education/classes('<guid>')/assignments?$select=addedStudentAction,addToCalendarAction",
"value": [
{
"classId": "ce2cd7da-e41b-4e66-8390-c9251e4c3a40",
"displayName": "Physics",
"closeDateTime": null,
"dueDateTime": "2024-07-05T18:29:00Z",
"assignDateTime": null,
"assignedDateTime": "2024-07-04T10:13:55.7459728Z",
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"feedbackResourcesFolderUrl": "https://graph.microsoft.com/v1.0/drives/b!uf0jSRLkbEOG04PymQ5PtqVEDwHjP_xMlkkpCG-1CkLPLpFkTfqZR5sy80gMS-VY/items/01VPGD5VLEUC5G56NOFVDKD6POMN4LGKVD",
"createdDateTime": "2024-07-04T08:46:19.8896923Z",
"lastModifiedDateTime": "2024-07-04T10:13:59.8878321Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "assigned",
"notificationChannelUrl": null,
"webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%22ce2cd7da-e41b-4e66-8390-c9251e4c3a40%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%22cb190e9f-650d-4798-b8d0-6d00079a4c4b%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addToCalendarAction": "studentsAndPublisher",
"addedStudentAction": "none",
"languageTag": "en-US",
"moduleUrl": null,
"id": "cb190e9f-650d-4798-b8d0-6d00079a4c4b",
"instructions": {
"content": "<div>Screw guage</div>",
"contentType": "html"
},
"grading": {
"@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
"maxPoints": 100
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "0dcb98c3-8c7c-4f7a-a10d-7ed76e03e38f",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "5e3ce6c0-2b1f-4285-8d4b-75ee78787346",
"displayName": null
}
}
}
]
}
例 5: $expand を使用して課題の成績を取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments?&expand=gradingScheme
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignments(gradingScheme())",
"@odata.nextLink": "https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments?expand=gradingScheme&$skiptoken=MyZRVkZCUVVGQlFVRmtRVVZCUVVGQlFVRkJRWGxCUVVGQmNubDJiblZOYzBnNVJWTndkbEJHVTNKVlVuVmlRVDA5",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET education/classes('<guid>')/assignments?$select=addedStudentAction,addToCalendarAction",
"value": [
{
"classId": "37d99af7-cfc5-4e3b-8566-f7d40e4a2070",
"displayName": "new submission",
"closeDateTime": null,
"dueDateTime": "2025-04-29T18:29:00Z",
"assignDateTime": null,
"assignedDateTime": "2025-04-29T14:53:05.2974529Z",
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"feedbackResourcesFolderUrl": "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F8CNZWU38SarWxPyWM7jx/items/01VANVJQ7ONF5UOYTXZVEKCZE43FTQRH2S",
"createdDateTime": "2025-04-29T14:52:15.4472281Z",
"lastModifiedDateTime": "2025-05-07T21:28:57.6756103Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "assigned",
"notificationChannelUrl": "https://graph.microsoft.com/v1.0/teams/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/channels/37d99af7-cfc5-4e3b-8566-f7d40e4a2070",
"webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%2237d99af7-cfc5-4e3b-8566-f7d40e4a2070%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%22ed33a213-f67f-4eb8-bfea-f45e6cba041f%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addToCalendarAction": "studentsAndTeamOwners",
"addedStudentAction": "assignIfOpen",
"languageTag": "en-US",
"moduleUrl": "https://graph.microsoft.com/v1.0/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/modules/1b9a03b6-dcc5-4ff1-8226-b92e25072f43/",
"id": "ed33a213-f67f-4eb8-bfea-f45e6cba041f",
"instructions": {
"content": "new submission",
"contentType": "html"
},
"grading": {
"@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
"maxPoints": 100
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"gradingScheme": {
"id": "696290ba-1925-490e-a5d2-026bad0dbdc1",
"displayName": "New name for Pass/Fail Scheme",
"hidePointsDuringGrading": false,
"grades": [
{
"displayName": "Pass",
"minPercentage": 60,
"defaultPercentage": 100
},
{
"displayName": "Fail",
"minPercentage": 0,
"defaultPercentage": 0
}
]
}
}
]
}