通过 Graph 创建 educationClass 时无法创建 class 作业
Not possible to create class assignment when educationClass created via Graph
我创建了 2 个 educationClass
:
- educationClass with description Test100 通过 Microsoft Graph
创建
- educationClass,描述为 Test,由 Teams 应用程序创建。
教育class 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 创建的 class。
对我来说,Graph 创建的 educationClass 的组属性中似乎缺少某些内容。
GET GROUP
对 API 创建的 class 的回应:
{
"@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 中创建的 class 的回复:
{
"@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"
}
注意两个Group的creationOptions
和resourceBehaviorOptions
是不一样的。
当我尝试向由 GRAPH API 创建的教育 classes 添加新作业时,我收到以下消息:"Education class is being setup"
有必要发送学期开始日期和结束日期。
"term":{
"displayName":"Term2",
"externalID":"2",
"startDate":"2017-09-01",
"endDate":"2019-08-31"
}
您的观察很准确。赋值 Api(目前在 Graph Beta 中)没有读取所有可能表示 class 类型的属性。 (creationOptions 和另一个扩展 属性 可以标记为 class 类型。确切地标记 属性 取决于创建组的时间和方式)。
我们正在努力修复并在本周进行修补。
谢谢
我创建了 2 个 educationClass
:
- educationClass with description Test100 通过 Microsoft Graph 创建
- educationClass,描述为 Test,由 Teams 应用程序创建。
教育class 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 创建的 class。
对我来说,Graph 创建的 educationClass 的组属性中似乎缺少某些内容。
GET GROUP
对 API 创建的 class 的回应:
{
"@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 中创建的 class 的回复:
{
"@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"
}
注意两个Group的creationOptions
和resourceBehaviorOptions
是不一样的。
当我尝试向由 GRAPH API 创建的教育 classes 添加新作业时,我收到以下消息:"Education class is being setup"
有必要发送学期开始日期和结束日期。
"term":{
"displayName":"Term2",
"externalID":"2",
"startDate":"2017-09-01",
"endDate":"2019-08-31"
}
您的观察很准确。赋值 Api(目前在 Graph Beta 中)没有读取所有可能表示 class 类型的属性。 (creationOptions 和另一个扩展 属性 可以标记为 class 类型。确切地标记 属性 取决于创建组的时间和方式)。
我们正在努力修复并在本周进行修补。 谢谢