团队资源类型team resource type

重要

Microsoft Graph 中/beta的版本下的 api 可能会发生更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

Microsoft Teams 中的团队是 channel 对象的集合。A team in Microsoft Teams is a collection of channel objects. 频道表示团队内部的某个主题,因此是讨论的逻辑隔离。A channel represents a topic, and therefore a logical isolation of discussion, within a team.

每个团队与一个相关联。Every team is associated with a group. 该组具有与团队相同的 ID,例如 /groups/{id}/team/teams/{id} 相同。The group has the same ID as the team - for example, /groups/{id}/team is the same as /teams/{id}. 有关使用组和团队内部成员的详细信息,请参阅使用 Microsoft Graph REST API 来处理 Microsoft TeamsFor more information about working with groups and members in teams, see Use the Microsoft Graph REST API to work with Microsoft Teams.

方法Methods

方法Method 返回类型Return Type 说明Description
创建团队Create team teamsAsyncOperationteamsAsyncOperation 从头开始创建团队。Create a team from scratch.
从组创建团队Create team from group teamteam 创建新的团队,或向现有组添加团队。Create a new team, or add a team to an existing group.
获取团队Get team teamteam 检索指定团队的属性和关系。Retrieve the properties and relationships of the specified team.
更新团队Update team teamteam 更新指定团队的属性。Update the properties of the specified team.
删除团队Delete team None 删除团队及其关联的组。Delete the team and its associated group.
克隆团队Clone team teamsAsyncOperationteamsAsyncOperation 复制团队及其关联的组。Copy the team and its associated group.
存档团队Archive team teamsAsyncOperationteamsAsyncOperation 将团队置于只读状态。Put the team in a read-only state.
解档团队Unarchive team teamsAsyncOperationteamsAsyncOperation 将团队还原到读写状态。Restore the team to a read-write state.
列出你的团队List your teams team 集合team collection 列出你属于的团队。List the teams you are a member of.
列出所有团队List all teams group 集合group collection 列出具有团队的所有组。List all groups that have teams.
获取团队照片Get team photo 二进制数据Binary data 获取团队的照片(图片)。Get the photo (picture) for a team.
更新团队照片Update team photo None 更新团队的照片(图片)。Update the photo (picture) for a team.
将应用发布到你的组织Publish apps to your organization teamsAppteamsApp 创建仅对你的组织可见的 Teams 应用。Create Teams apps visible only to your organization.
将应用添加到团队Add app to team teamsAppInstallationteamsAppInstallation 将应用添加(安装)到团队。Adds (installs) an app to a team.
将选项卡添加到频道Add tab to channel teamsTabteamsTab 将选项卡添加(安装)到团队的频道。Adds (installs) a tab to a team's channel.
列出频道消息List channel messages chatMessagechatMessage 获取频道中的消息Get messages in a channel
在频道中创建 chatMessageCreate chatMessage in a channel chatMessagechatMessage 向频道发送消息。Send a message to a channel.
在频道中创建 chatMessage 回复Create chatMessage reply in a channel chatMessagechatMessage 在频道中回复消息。Reply to a message in a channel.

属性Properties

属性Property 类型Type 说明Description
displayNamedisplayName stringstring 团队的名称。The name of the team.
descriptiondescription stringstring 组的说明(可选)。An optional description for the team.
classificationclassification stringstring 标签(可选)。An optional label. 通常说明团队的数据或业务敏感性。Typically describes the data or business sensitivity of the team. 必须与租户目录中的一个预配置集匹配。Must match one of a pre-configured set in the tenant's directory.
specializationspecialization teamSpecializationteamSpecialization 可选。Optional. 指示团队是否适用于特定用例。Indicates whether the team is intended for a particular use case. 每个团队专用化都可以访问针对其用例的独特行为和体验。Each team specialization has access to unique behaviors and experiences targeted to its use case.
visibilityvisibility teamVisibilityTypeteamVisibilityType 组和团队的可见性。The visibility of a the group and team. 默认值为 Public。Defaults to Public.
funSettingsfunSettings teamFunSettingsteamFunSettings 用于配置团队中 Giphy、成员和贴纸使用情况的设置。Settings to configure use of Giphy, memes, and stickers in the team.
guestSettingsguestSettings teamGuestSettingsteamGuestSettings 用于配置来宾是否可以在团队中创建、更新或删除频道的设置。Settings to configure whether guests can create, update, or delete channels in the team.
internalIdinternalId 字符串string 已在一些位置(如审核日志/Office 365 管理活动 API)使用的团队唯一 ID。A unique ID for the team that has been used in a few places such as the audit log/Office 365 Management Activity API.
isArchivedisArchived BooleanBoolean 此团队是否处于只读模式。Whether this team is in read-only mode.
memberSettingsmemberSettings teamMemberSettingsteamMemberSettings 用于配置成员是否可以在团队中执行某些操作(例如,创建频道和添加机器人)的设置。Settings to configure whether members can perform certain actions, for example, create channels and add bots, in the team.
messagingSettingsmessagingSettings teamMessagingSettingsteamMessagingSettings 用于配置团队中的消息传递和提及的设置。Settings to configure messaging and mentions in the team.
discoverySettingsdiscoverySettings teamDiscoverySettingsteamDiscoverySettings 用于让他人配置团队可发现性的设置。Settings to configure team discoverability by others.
webUrlwebUrl string (readonly)string (readonly) 用于转到 Microsoft Teams 客户端中团队的超链接。A hyperlink that will go to the team in the Microsoft Teams client. 这是在 Microsoft Teams 客户端中右键单击团队并选择获取团队链接时获取的 URL。This is the URL that you get when you right-click a team in the Microsoft Teams client and select Get link to team. 应将此 URL 视为不透明的 blob,而不对其进行解析。This URL should be treated as an opaque blob, and not parsed.
classSettingsclassSettings teamClassSettingsteamClassSettings 配置班级设置。Configure settings of a class. 仅当团队代表班级时可用。Available only when the team represents a class.

关系Relationships

关系Relationship 类型Type 说明Description
channelschannels channel 集合channel collection 与团队相关的频道和消息的集合。The collection of channels & messages associated with the team.
installedAppsinstalledApps teamsAppInstallation 集合teamsAppInstallation collection 此团队中安装的应用。The apps installed in this team.
ownersowners useruser 此团队的所有者列表。The list of this team's owners. 目前,在使用应用程序权限创建团队时,必须指定一个所有者。Currently, when creating a team using application permissions, exactly one owner must be specified. 当使用用户委派的权限时,不能指定任何所有者(当前用户是所有者)。When using user delegated permissions, no owner can be specified (the current user is the owner). 必须将所有者指定为对象 ID (GUID),而不是 UPN。Owner must be specified as an object ID (GUID), not a UPN.
operationsoperations teamsAsyncOperation 集合teamsAsyncOperation collection 在此团队中运行过或正在运行的异步操作。The async operations that ran or are running on this team.
primaryChannelprimaryChannel 频道channel 团队的常规频道。The general channel for the team.
scheduleschedule 日程安排schedule 此团队的排班安排。The schedule of shifts for this team.
templatetemplate teamsTemplateteamsTemplate 创建此团队时所使用的模板。The template this team was created from. 请参阅可用模板See available templates.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。The following is a JSON representation of the resource.

注意: 如果团队属于班级类型,则会在团队上应用 classSettings 属性。Note: If the team is of type class, a classSettings property is applied on the team.

{
  "guestSettings": {"@odata.type": "microsoft.graph.teamGuestSettings"},
  "memberSettings": {"@odata.type": "microsoft.graph.teamMemberSettings"},
  "messagingSettings": {"@odata.type": "microsoft.graph.teamMessagingSettings"},
  "funSettings": {"@odata.type": "microsoft.graph.teamFunSettings"},
  "discoverySettings": {"@odata.type": "microsoft.graph.teamDiscoverySettings"},
  "internalId": "string",
  "isArchived": false,
  "webUrl": "string (URL)",
  "displayName": "string",
  "description": "string",
  "classification": "string",
  "specialization": "string",
  "visibility": "string",
  "classSettings": {"@odata.type": "microsoft.graph.teamClassSettings"}
}

另请参阅See Also