Microsoft Teams API 概述Microsoft Teams API overview

Microsoft Teams 是团队合作和智能通信的终极中心。Microsoft Teams is the ultimate hub for teamwork and intelligent communications. Microsoft Teams 基于 Office 365 超过 1.2 亿用户的实力和规模,提供了基于聊天的协作、会议、通话和企业语音功能。Built on the strength and scale of Office 365 with over 120 million users, Microsoft Teams delivers chat-based collaboration, meetings, calling, and enterprise voice features.

为什么与 Microsoft Teams 集成?Why integrate with Microsoft Teams?

自动化团队生命周期Automate team lifecycles

当出现新的业务问题时,使用 Microsoft Graph 创建一个新的虚拟团队,向团队添加合适的人员,并使用渠道选项卡应用配置团队。Use Microsoft Graph to create a new virtual team when a new business issue arises, add the right people to the team, and configure the team with channels, tabs, and apps. 如果想要让新团队一起讨论业务问题,请在团队日历中添加一个新事件If you want to get the new team together to discuss the business issue, add a new event to the team calendar.

通过创建团队、添加成员和所有者、配置团队设置、添加渠道、安装应用、添加选项卡和适时存档或删除团队来自动化团队生命周期。

当业务问题得到解决且不再需要团队时,可使用 Microsoft Teams API 来存档删除团队。When the business issue is resolved and you no longer need the team, use the Microsoft Teams API to archive or delete the team. 如果在创建团队时已了解团队的最长持续时间,则可为团队设置 Office 365 组过期策略,以便根据该策略自动删除团队。If you know the maximum duration of the team when you create it, set an Office 365 group expiration policy for the team that automatically removes the team according to the policy.

即使在无人参与的情况下也可以完成工作Get work done even when no one is around

使用应用程序权限在无人参与的情况下使用团队渠道选项卡Use application permissions to work with teams, channels, and tabs without human intervention. 在客户下订单时创建一个新渠道。Create a new channel when your customer files an order. 在学年开始时为班级自动创建团队并在学年结束时对其存档。Automatically create teams for classes at the beginning of the school year, and archive them at the end.

创建链接到应用的团队Create teams linked to your app

允许客户创建新团队渠道Let customers to create new teams and channels. 在新团队中安装 Teams 应用Install your Teams app in the new teams. 在新渠道中将应用绑定到选项卡Pin your app to a tab in the new channel. 将消息发送到链接回网站的渠道。Send messages to the channel linking back to your website.

创建和管理多个团队和渠道Create and manage multiple teams and channels

使用 Microsoft Graph,可以轻松地创建大型团队并使用用户和渠道对其进行填充,方法是自动化创建和管理团队渠道选项卡应用Microsoft Graph makes it easy to create large numbers of teams and populate them with users and channels, by automate creating and managing teams, channels, tabs, and apps. Microsoft Graph 还允许用户查找存档不再使用的团队。Microsoft Graph also lets you find and archive the teams you are no longer using. 此 API 与构建 Microsoft Teams 管理中心Teams PowerShell commandlets 的 API 相同。This is the same API that the Microsoft Teams Admin Center and Teams PowerShell commandlets are built on.

向团队部署应用Deploy apps to teams

在租户中列出团队,并向其安装应用List the teams in your tenant, and install apps to them. 在渠道中创建选项卡,以使用户轻松访问应用。Create tabs in channels to give users easy access to apps.

在任何类型的应用中使用 Microsoft GraphUse Microsoft Graph in any kind of app

Microsoft Teams 应用为工作小组提供了一种新的工具,使协作成为一种更高效、更具吸引力的体验。Microsoft Teams apps give work groups a new tool to make collaboration a more productive and compelling experience. 使用这些应用,工作组用户可共享资产、通过聊天进行交互,并在团队日历上安排事件。These apps let work group users share assets, interact through chat, and schedule events on the team calendar. 这些应用还可以自动化团队、渠道和对话的创建,提高 Microsoft Teams 的价值。These apps can also automate creating teams, channels, and conversations, enhancing the value of Microsoft Teams.

可以创建在 Microsoft Teams 用户体验以外运行的网站、服务和本机平台应用程序,并调用 Teams API 以自动执行 Teams 方案。You can create web sites, services, and native platform applications that run outside the Microsoft Teams user experience, and call the Teams API to automate Teams scenarios.

为 Microsoft Teams 启用的应用类型Types of apps enabled for Microsoft Teams

从选项卡、机器人、网站和服务中调用 Microsoft Teams API

这些协作工具包括启用了 Microsoft Graph 的选项卡或在 Microsoft Teams 应用内运行的机器人。These collaboration tools include Microsoft Graph-enabled tabs or bots running inside Microsoft Teams apps. 此外,还可以在 Microsoft Teams 应用以外调用 Microsoft Graph,如从网站或者 Web 服务进行调用。You can also call Microsoft Graph outside of a Microsoft Teams app, such as from a website or a web service. 如果已为 Microsoft Graph 启用网站,则可以通过使用 Microsoft Teams 开发人员平台创建使用现有网站代码的选项卡,将此项工作用于 Microsoft Teams。If you've already enabled your website for Microsoft Graph, you can use that work for Microsoft Teams by using the Microsoft Teams developer platform to create a tab that uses the existing website code.

Microsoft Teams API 可以增强 Teams 内部和外部的应用:Microsoft Teams APIs can enhance apps inside and outside of Teams:

应用类型App type 方案描述Scenario description
选项卡Tabs 在 Microsoft Teams 中呈现内容。Surface your content in Microsoft Teams.
机器人Bots 帮助用户通过对话完成任务。Help users get tasks done in conversations.
连接器Connectors 将外部服务中的更新发布到渠道。Post updates from external services to channels.
可操作消息Actionable messaging 将增强交互添加到连接器卡。Add enhanced interaction to your connector cards.
消息扩展Messaging extensions 允许用户查询和共享对话中的信息。Allow users to query and share information in conversations.
网站Websites 在网页中呈现增强的内容。Surface enhanced content in your web pages.
服务Services 通过 Web 服务使用 Microsoft Graph 数据增强客户端应用程序。Enhance your client applications with Microsoft Graph data via your web service.
活动源Activity feed 通过源通知吸引用户。Engage users via feed notifications.
通话和联机会议(预览)Calling and online meetings (Preview) 创建包含机器人的 Microsoft Teams 应用可以启动和参与音频/视频通话、基于互动语音响应 (IVR) 流路由/传输通话和参与联机会议。Create Microsoft Teams apps with bots that can initiate and participate in audio/video calls, route/transfer calls based on interactive voice response (IVR) flows, and participate in online meetings.

API 参考API reference

在查找此服务的 API 参考?Looking for the API reference for this service?

请参阅 Microsoft Graph 中的 Teams APISee the Teams API in Microsoft Graph.

后续步骤Next steps