Create teamworkTag

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Create a standard tag for members in the team.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) TeamworkTag.ReadWrite Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application TeamworkTag.ReadWrite.All Not available.

HTTP request

POST /teams/{team-Id}/tags

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the teamworkTag object.

The following table lists the properties that are required when you create the teamworkTag.

Property Type Description
displayName String Name of the tag. The value can't be more than 40 characters.
members teamworkTagMember collection The unique identifier for the members of the team to add to the tag. The members count shouldn't be more than 25.

Response

If successful, this method returns a 201 Created response code and a teamworkTag object in the response body.

Examples

Request

POST https://graph.microsoft.com/beta/teams/53c53217-fe77-4383-bc5a-ed4937a1aecd/tags
Content-Type: application/json

{
  "displayName": "Finance",
  "members":[
	{
		"userId":"92f6952f-61ca-4a94-8910-508a240bc167"
	},
	{
		"userId":"085d800c-b86b-4bfc-a857-9371ad1caf29"
	}
  ]
}

Response

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.teamworkTag",
  "id": "MjQzMmI1N2ItMGFiZC00M2RiLWFhN2ItMTZlYWRkMTE1ZDM0IyM3ZDg4M2Q4Yi1hMTc5LTRkZDctOTNiMy1hOGQzZGUxYTIxMmUjI3RhY29VSjN2RGk==",
  "teamId": "53c53217-fe77-4383-bc5a-ed4937a1aecd",
  "displayName": "Finance",
  "memberCount": 2,
  "tagType": "standard"
}