我需要创建一个Microsoft Team for Classes(具有“Assignments”选项卡的特殊团队)。
我无法弄清楚如何使用Microsoft Graph API(Beta)创建具有“任务”选项卡的新团队。
此外,有没有什么特别的类笔记本(OneNote)创建?
我需要能够以编程方式执行此操作。
Microsoft Graph目前不支持创建新团队。来自documentation:
以下是API级别的差异:
- 持久聊天仅适用于Microsoft Teams。此功能由channel,chatThread和chatMessage资源按层次结构表示。
- 组会话仅适用于Office 365组。此功能由conversation,conversationThread和post资源按层次结构表示。
- 目前,您可以使用“创建组”API创建Office 365组,但不能使用Microsoft团队中的团队。
- List加入团队方法仅适用于Microsoft Teams。
- 另请参阅这些API的已知问题。
这是一个已知问题,但我没有ETA可用的时候。
我们将在今年晚些时候预览一个API。
我刚刚测试了使用Microsoft Graph Explorer(Beta)创建团队。并发现它非常有用。以下测试对您的方案非常有用。模板的使用非常有用。
请按照步骤操作。
发布:https://graph.microsoft.com/beta/teams
请求机构:
{
"[email protected]": "https://graph.microsoft.com/beta/teamsTemplates('educationClass')",
"displayName": "MySampleTeam",
"description": "My Sample Team’s Description ",
"channels": [
{
"displayName": "Announcements 📢",
"isFavoriteByDefault": true,
"description": "This is a sample announcements channel that is favorited by default. Use this channel to make an important team, product, and service announcements."
},
{
"displayName": "Planning 📅 ",
"description": "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu.",
"isFavoriteByDefault": false
}
]
}
上面的查询使用OneNote Tab创建了这个很棒的团队。 Created Team
请注意,在上面的requestBody“[email protected]”中:“https://graph.microsoft.com/beta/teamsTemplates('educationClass')”:educationClass是一个模板。
了解更多关于团队模板here的信息。
祝好运。快乐的队:)