TeamworkTag.ReadWrite.All
Allows the app to read and write tags in Teams without a signed-in user.
Permission Details
Read and write tags in Teams
Allows the app to read and write tags in Teams without a signed-in user.
a3371ca5-911d-46d6-901c-42c8c7a937d8
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
description |
StringNullable |
The description of the tag as it appears to the user in Microsoft Teams. A teamworkTag can't have more than 200 teamworkTagMembers. |
displayName |
StringNullable |
The name of the tag as it appears to the user in Microsoft Teams. |
id |
String |
The unique identifier for the tag. Inherited from entity. |
memberCount |
Int32Nullable |
The number of users assigned to the tag. |
tagType |
teamworkTagType |
The type of the tag. Default is standard. |
teamId |
StringNullable |
ID of the team in which the tag is defined. |
members |
teamworkTagMember collection |
Users assigned to the tag. |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"@odata.type": "#microsoft.graph.teamworkTag",
"description": "String",
"displayName": "String",
"id": "String (identifier)",
"memberCount": "Int32",
"tagType": "String",
"teamId": "String"
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
members |
teamworkTagMember collection |
Users assigned to the tag. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new TeamworkTag
{
DisplayName = "Finance",
Members = new List<TeamworkTagMember>
{
new TeamworkTagMember
{
UserId = "92f6952f-61ca-4a94-8910-508a240bc167",
},
new TeamworkTagMember
{
UserId = "085d800c-b86b-4bfc-a857-9371ad1caf29",
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teams["{team-id}"].Tags.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const teamworkTag = {
displayName: 'Finance',
members: [
{
userId: '92f6952f-61ca-4a94-8910-508a240bc167'
},
{
userId: '085d800c-b86b-4bfc-a857-9371ad1caf29'
}
]
};
await client.api('/teams/53c53217-fe77-4383-bc5a-ed4937a1aecd/tags')
.post(teamworkTag);
Import-Module Microsoft.Graph.Teams
$params = @{
displayName = "Finance"
members = @(
@{
userId = "92f6952f-61ca-4a94-8910-508a240bc167"
}
@{
userId = "085d800c-b86b-4bfc-a857-9371ad1caf29"
}
)
}
New-MgTeamTag -TeamId $teamId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.teamwork_tag import TeamworkTag
from msgraph.generated.models.teamwork_tag_member import TeamworkTagMember
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TeamworkTag(
display_name = "Finance",
members = [
TeamworkTagMember(
user_id = "92f6952f-61ca-4a94-8910-508a240bc167",
),
TeamworkTagMember(
user_id = "085d800c-b86b-4bfc-a857-9371ad1caf29",
),
],
)
result = await graph_client.teams.by_team_id('team-id').tags.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions and search for TeamworkTag.ReadWrite.All
Grant Admin Consent
Application permissions always require admin consent.