【发布时间】:2020-10-09 02:14:22
【问题描述】:
我创建了 2 个educationClass:
- educationClass 与描述 Test100 通过 Microsoft Graph 创建
- educationClass 具有由 Teams 应用创建的描述 Test。
educationclass Test100 是使用 POST 到 https://graph.microsoft.com/V1.0/education/classes 和以下 JSON 对象创建的
{
"displayName": "Test100",
"description": "Test100",
"externalId": "3099",
"mailNickName": "Test100-3099"
}
教师使用POST 添加到
https://graph.microsoft.com/V1.0/education/classes/ID-Education-Class/teachers/$ref 和以下 JSON 对象
{
"@odata.id": "https://graph.microsoft.com/V1.0/education/users/teacher-ID"
}
使用POST 将成员添加到
https://graph.microsoft.com/V1.0/education/classes/ID-Education-Class/members/$ref 和以下 JSON 对象
{
"@odata.id": "https://graph.microsoft.com/V1.0/education/users/ID-Member"
}
当我想在 Teams 应用中分配作业时,它适用于通过 Teams 创建的 educationClass,但不适用于通过 Graph 创建的课程。
在我看来,Graph 创建的 educationClass 的 Group 属性中似乎缺少某些内容。
GET GROUP 对 API 创建的类的响应:
{
"@odata.context": "https://graph.microsoft.com/V1.0/$metadata#groups/$entity",
"id": "cd5a64f4-8784-4356-8c04-31deb1aa6849",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2018-08-06T08:36:28Z",
"creationOptions": [],
"description": "Test100",
"displayName": "Test100",
"groupTypes": ["Unified"],
"mail": "Test100-3099@wisad.be",
"mailEnabled": true,
"mailNickname": "Test100-3099",
"onPremisesLastSyncDateTime": null,
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"proxyAddresses": ["smtp:Test100-3099@mydomein", "SMTP:Test100-3099@mydomein"],
"renewedDateTime": "2018-08-06T08:36:28Z",
"resourceBehaviorOptions": [],
"resourceProvisioningOptions": ["Team"],
"securityEnabled": false,
"visibility": "HiddenMembership",
"extension_fe2174665583431c953114ff7268b7b3_Education_SyncSource_SectionId": "3099",
"extension_fe2174665583431c953114ff7268b7b3_Education_CreatedByUserId": "myuserid",
"extension_fe2174665583431c953114ff7268b7b3_Education_CreatedByAppId": "MyAppID",
"extension_fe2174665583431c953114ff7268b7b3_Education_ObjectType": "Section"
}
GET GROUP 对 Teams 中创建的课程的回复:
{
"@odata.context": "https://graph.microsoft.com/V1.0/$metadata#groups/$entity",
"id": "e971cfd4-dc4c-4321-ae51-4d216557bec8",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2018-08-06T11:56:52Z",
"creationOptions": ["classAssignments", "ExchangeProvisioningFlags:2509"],
"description": "Test",
"displayName": "Test",
"groupTypes": ["Unified"],
"mail": "Test92@mydomain",
"mailEnabled": true,
"mailNickname": "Test92",
"onPremisesLastSyncDateTime": null,
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"proxyAddresses": ["smtp:Test92@mydomein.be", "SMTP:Test92@mydomain.be"],
"renewedDateTime": "2018-08-06T11:56:52Z",
"resourceBehaviorOptions": [
"HideGroupInOutlook",
"WelcomeEmailDisabled",
"ConnectorsDisabled",
"SubscribeNewGroupMembers"
],
"resourceProvisioningOptions": [],
"securityEnabled": false,
"visibility": "HiddenMembership",
"extension_fe2174665583431c953114ff7268b7b3_Education_ObjectType": "Section"
}
请注意,两个组的creationOptions 和resourceBehaviorOptions 是不同的。
当我尝试向 GRAPH API 创建的教育课程添加新作业时,我收到以下消息:“正在设置教育课程”
【问题讨论】:
-
您能否提供一个代码示例,展示您如何在 Microsoft Graph 中创建组?
-
我用代码示例更新了顶部的问题。
标签: microsoft-graph-api microsoft-graph-edu