更新团队Update team

命名空间:microsoft.graphNamespace: microsoft.graph

更新指定 团队的属性。Update the properties of the specified team.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) TeamSettings.ReadWrite.All、Group.ReadWrite.All、Directory.ReadWrite.AllTeamSettings.ReadWrite.All, Group.ReadWrite.All, Directory.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application TeamSettings.ReadWrite.All、Group.ReadWrite.All、Directory.ReadWrite.AllTeamSettings.ReadWrite.All, Group.ReadWrite.All, Directory.ReadWrite.All

注意:此 API 支持管理员权限。Note: This API supports admin permissions. 全局管理员和 Microsoft Teams 服务管理员可以访问自己不是其中成员的团队。Global admins and Microsoft Teams service admins can access teams that they are not a member of.

HTTP 请求HTTP request

PATCH /teams/{id}

请求标头Request headers

标头Header Value
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.
Content-TypeContent-Type application/jsonapplication/json

请求正文Request body

在请求正文中,提供 team 对象的 JSON 表示形式。In the request body, supply a JSON representation of team object.

响应Response

如果成功,此方法返回 204 No Content 响应代码。If successful, this method returns a 204 No Content response code.

示例Example

请求Request

下面展示了示例请求。The following is an example of the request.

PATCH https://graph.microsoft.com/v1.0/teams/{id}
Content-type: application/json
Content-length: 211

{  
  "memberSettings": {
    "allowCreateUpdateChannels": true
  },
  "messagingSettings": {
    "allowUserEditMessages": true,
    "allowUserDeleteMessages": true
  },
  "funSettings": {
    "allowGiphy": true,
    "giphyContentRating": "strict"
  }
}

响应Response

HTTP/1.1 204 No Content