Skip to main content

Actions

The ballerinax/microsoft.teams package exposes the following clients:

ClientPurpose
ClientManage teams, channels, members, messages, tabs, and tags in Microsoft Teams through the Microsoft Graph API v1.0.

Client

Manage teams, channels, members, messages, tabs, and tags in Microsoft Teams through the Microsoft Graph API v1.0. The connector supports both delegated (user) and application (app-only) OAuth 2.0 authentication.

Configuration

FieldTypeDefaultDescription
authOAuth2ClientCredentialsGrantConfig | BearerTokenConfig | OAuth2RefreshTokenGrantConfigRequiredOAuth 2.0 credentials: client-credentials (app-only), a bearer token, or a refresh-token grant.
timeoutdecimal30Maximum time (seconds) to wait for a response.
httpVersionhttp:HttpVersionHTTP_2_0HTTP protocol version.

Additional standard http:ClientConfiguration options are also supported (retry, circuit breaker, proxy, secure socket, cookies, compression, response limits, and so on).

Initializing the client

import ballerinax/microsoft.teams;

configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string refreshToken = ?;
configurable string refreshUrl = ?;

teams:Client teamsClient = check new ({
auth: {
clientId,
clientSecret,
refreshToken,
refreshUrl
}
});

Operations

Teams

createTeam

Required payload fields: displayName, plus the [email protected] navigation binding that selects the base template, e.g. "[email protected]": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')". When the calling app uses application (app-only) permissions, also include a members array with at least one owner — an aadUserConversationMember with roles = ["owner"] and a [email protected] binding to the user (https://graph.microsoft.com/v1.0/users('{user-id}')). To create a team from an existing Microsoft 365 group, bind the group with [email protected] set to https://graph.microsoft.com/v1.0/groups('{group-id}') together with [email protected] and omit displayName (the group must have at least one owner). Team creation is asynchronous (see the note in the function body).

Parameters:

NameTypeRequiredDescription
payloadTeamYesThe team to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->createTeam({displayName: "Engineering", description: "Engineering team", "[email protected]": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')"});
getTeam

Get team.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetTeamQueriesNoQueries to be sent with the request

Returns: Team|error

Sample code:

teams:Team result = check teamsClient->getTeam("<team-id>");

Sample response:

{"id": "<team-id>", "displayName": "Engineering", "description": "Engineering team", "visibility": "public", "webUrl": "https://teams.microsoft.com/l/team/..."}
deleteTeam

Delete entity from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersDeleteTeamHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteTeam("<team-id>");
updateTeam

No fields are required; send only the team properties to change (for example displayName, description, visibility, funSettings, memberSettings). Read-only properties are ignored.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadTeamYesNew property values
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->updateTeam("<team-id>", {displayName: "Engineering", description: "Engineering team"});

All channels

listAllChannels

List allChannels.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListAllChannelsQueriesNoQueries to be sent with the request

Returns: ChannelCollectionResponse|error

Sample code:

teams:ChannelCollectionResponse result = check teamsClient->listAllChannels("<team-id>");

Sample response:

{"value": [{"id": "<channel-id>", "displayName": "Announcements", "description": null, "membershipType": "standard", "webUrl": "https://teams.microsoft.com/l/channel/..."}]}
getAllChannel

Get allChannels from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetAllChannelQueriesNoQueries to be sent with the request

Returns: Channel|error

Sample code:

teams:Channel result = check teamsClient->getAllChannel("<team-id>", "<channel-id>");

Sample response:

{"id": "<channel-id>", "displayName": "Announcements", "description": null, "membershipType": "standard", "webUrl": "https://teams.microsoft.com/l/channel/..."}
countAllChannels

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountAllChannelsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countAllChannels("<team-id>");

Sample response:

"<value>"

Channels

listChannels

List channels.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelsQueriesNoQueries to be sent with the request

Returns: ChannelCollectionResponse|error

Sample code:

teams:ChannelCollectionResponse result = check teamsClient->listChannels("<team-id>");

Sample response:

{"value": [{"id": "<channel-id>", "displayName": "Announcements", "description": null, "membershipType": "standard", "webUrl": "https://teams.microsoft.com/l/channel/..."}]}
createChannel

Required payload fields: displayName (max 50 characters). A standard channel is created by default. For a private or shared channel, also set membershipType ("private" / "shared") and include a members array with exactly one owner — an aadUserConversationMember with roles = ["owner"] and a [email protected] binding to the user (https://graph.microsoft.com/v1.0/users('{user-id}')).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadChannelYesThe channel to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->createChannel("<team-id>", {displayName: "Announcements", membershipType: "standard"});
getChannel

Get channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelQueriesNoQueries to be sent with the request

Returns: Channel|error

Sample code:

teams:Channel result = check teamsClient->getChannel("<team-id>", "<channel-id>");

Sample response:

{"id": "<channel-id>", "displayName": "Announcements", "description": null, "membershipType": "standard", "webUrl": "https://teams.microsoft.com/l/channel/..."}
deleteChannel

Delete channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersDeleteChannelHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannel("<team-id>", "<channel-id>");
updateChannel

No fields are required; send only the channel properties to change (for example displayName, description). The team's default General channel can't be renamed.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadChannelYesThe channel properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->updateChannel("<team-id>", "<channel-id>", {displayName: "Announcements", description: "Team-wide announcements and updates"});
countChannels

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannels("<team-id>");

Sample response:

"<value>"
getAllChannelMessages

Invoke function getAllMessages.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetAllChannelMessagesQueriesNoQueries to be sent with the request

Returns: ChatMessageCollectionResponse|error

Sample code:

teams:ChatMessageCollectionResponse result = check teamsClient->getAllChannelMessages("<team-id>");

Sample response:

{"value": [{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}]}
getAllRetainedChannelMessages

Invoke function getAllRetainedMessages.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetAllRetainedChannelMessagesQueriesNoQueries to be sent with the request

Returns: ChatMessageCollectionResponse|error

Sample code:

teams:ChatMessageCollectionResponse result = check teamsClient->getAllRetainedChannelMessages("<team-id>");

Sample response:

{"value": [{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}]}

Channels / all members

listChannelAllMembers

List allMembers.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelAllMembersQueriesNoQueries to be sent with the request

Returns: ConversationMemberCollectionResponse|error

Sample code:

teams:ConversationMemberCollectionResponse result = check teamsClient->listChannelAllMembers("<team-id>", "<channel-id>");

Sample response:

{"value": [{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}]}
createChannelAllMember

Required payload fields: the [email protected] navigation binding (https://graph.microsoft.com/v1.0/users('{user-id}')) and roles (["owner"] for an owner, [] for a standard member). Members can be added only to private and shared channels, and the user must already belong to the parent team's roster.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadConversationMemberYesThe member to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->createChannelAllMember("<team-id>", "<channel-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
getChannelAllMember

Get allMembers from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
conversationMemberIdstringYesThe unique identifier of conversationMember
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelAllMemberQueriesNoQueries to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->getChannelAllMember("<team-id>", "<channel-id>", "<conversation-member-id>");

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
deleteChannelAllMember

Remove member from channel allMembers.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
conversationMemberIdstringYesThe unique identifier of conversationMember
headersDeleteChannelAllMemberHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelAllMember("<team-id>", "<channel-id>", "<conversation-member-id>");
updateChannelAllMember

Required payload field: roles (the new role set — ["owner"] to promote to owner, [] to demote to a standard member).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
conversationMemberIdstringYesThe unique identifier of conversationMember
payloadConversationMemberYesThe member properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->updateChannelAllMember("<team-id>", "<channel-id>", "<conversation-member-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"]});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
countChannelAllMembers

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelAllMembersQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelAllMembers("<team-id>", "<channel-id>");

Sample response:

"<value>"
addChannelAllMembers

Required: a non-empty values array (up to 200 members per call). Each entry requires the [email protected] binding and roles (["owner"] or []).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->addChannelAllMembers("<team-id>", "<channel-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}
removeChannelAllMembers

Required: a non-empty values array (up to 20 members per call). Each entry identifies the member to remove by the [email protected] binding (https://graph.microsoft.com/v1.0/users('{user-id}')).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->removeChannelAllMembers("<team-id>", "<channel-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}

Channels / enabled apps

listChannelEnabledApps

List enabledApps.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelEnabledAppsQueriesNoQueries to be sent with the request

Returns: TeamsAppCollectionResponse|error

Sample code:

teams:TeamsAppCollectionResponse result = check teamsClient->listChannelEnabledApps("<team-id>", "<channel-id>");

Sample response:

{"value": [{"id": "<app-id>", "externalId": null, "displayName": "Planner", "distributionMethod": "store"}]}
getChannelEnabledApp

Get teamsApp.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
teamsAppIdstringYesThe unique identifier of teamsApp
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelEnabledAppQueriesNoQueries to be sent with the request

Returns: TeamsApp|error

Sample code:

teams:TeamsApp result = check teamsClient->getChannelEnabledApp("<team-id>", "<channel-id>", "<teams-app-id>");

Sample response:

{"id": "<app-id>", "externalId": null, "displayName": "Planner", "distributionMethod": "store"}
countChannelEnabledApps

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelEnabledAppsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelEnabledApps("<team-id>", "<channel-id>");

Sample response:

"<value>"

Channels / files folder

getChannelFilesFolder

Get filesFolder.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelFilesFolderQueriesNoQueries to be sent with the request

Returns: DriveItem|error

Sample code:

teams:DriveItem result = check teamsClient->getChannelFilesFolder("<team-id>", "<channel-id>");

Sample response:

{"id": "<item-id>", "name": "Documents", "webUrl": "https://contoso.sharepoint.com/...", "size": 0, "folder": {"childCount": 4}}
getChannelFilesFolderContent

Get channel filesFolder content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelFilesFolderContentQueriesNoQueries to be sent with the request

Returns: byte[]|error

Sample code:

byte[] result = check teamsClient->getChannelFilesFolderContent("<team-id>", "<channel-id>");
updateChannelFilesFolderContent

The payload is the raw file content, uploaded as application/octet-stream. Simple upload supports files up to ~250 MB; larger files require an upload session, which this operation doesn't provide.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadbyte[]YesNew media content
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: DriveItem|error

Sample code:

teams:DriveItem result = check teamsClient->updateChannelFilesFolderContent("<team-id>", "<channel-id>", content);

Sample response:

{"id": "<item-id>", "name": "Documents", "webUrl": "https://contoso.sharepoint.com/...", "size": 0, "folder": {"childCount": 4}}
deleteChannelFilesFolderContent

Delete channel filesFolder content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersDeleteChannelFilesFolderContentHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelFilesFolderContent("<team-id>", "<channel-id>");

Channels / members

listChannelMembers

List members of a channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelMembersQueriesNoQueries to be sent with the request

Returns: ConversationMemberCollectionResponse|error

Sample code:

teams:ConversationMemberCollectionResponse result = check teamsClient->listChannelMembers("<team-id>", "<channel-id>");

Sample response:

{"value": [{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}]}
createChannelMember

Required payload fields: the [email protected] navigation binding (https://graph.microsoft.com/v1.0/users('{user-id}')) and roles (["owner"] for an owner, [] for a standard member). Members can be added only to private and shared channels, and the user must already belong to the parent team's roster.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadConversationMemberYesThe member to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->createChannelMember("<team-id>", "<channel-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
getChannelMember

Get member of channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
conversationMemberIdstringYesThe unique identifier of conversationMember
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelMemberQueriesNoQueries to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->getChannelMember("<team-id>", "<channel-id>", "<conversation-member-id>");

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
deleteChannelMember

Remove member from channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
conversationMemberIdstringYesThe unique identifier of conversationMember
headersDeleteChannelMemberHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelMember("<team-id>", "<channel-id>", "<conversation-member-id>");
updateChannelMember

Required payload field: roles (the new role set — ["owner"] to promote to owner, [] to demote to a standard member).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
conversationMemberIdstringYesThe unique identifier of conversationMember
payloadConversationMemberYesThe member properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->updateChannelMember("<team-id>", "<channel-id>", "<conversation-member-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"]});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
countChannelMembers

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelMembersQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelMembers("<team-id>", "<channel-id>");

Sample response:

"<value>"
addChannelMembers

Required: a non-empty values array (up to 200 members per call). Each entry requires the [email protected] binding and roles (["owner"] or []).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->addChannelMembers("<team-id>", "<channel-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}
removeChannelMembers

Required: a non-empty values array (up to 20 members per call). Each entry identifies the member to remove by the [email protected] binding (https://graph.microsoft.com/v1.0/users('{user-id}')).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->removeChannelMembers("<team-id>", "<channel-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}

Channels / messages

listChannelMessages

List channel messages.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelMessagesQueriesNoQueries to be sent with the request

Returns: ChatMessageCollectionResponse|error

Sample code:

teams:ChatMessageCollectionResponse result = check teamsClient->listChannelMessages("<team-id>", "<channel-id>");

Sample response:

{"value": [{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}]}
createChannelMessage

Required payload fields: body with a non-empty content (set body.contentType to "html" or "text"). Optional: attachments, mentions (referenced from HTML content by an at-mention tag), and hostedContents for inline images (each referenced by its @microsoft.graph.temporaryId).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadChatMessageYesThe message to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->createChannelMessage("<team-id>", "<channel-id>", {body: {contentType: "html", content: "Hello team!"}});

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
getChannelMessage

Get chatMessage in a channel or chat.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelMessageQueriesNoQueries to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->getChannelMessage("<team-id>", "<channel-id>", "<chat-message-id>");

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
deleteChannelMessage

Delete channel message.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersDeleteChannelMessageHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelMessage("<team-id>", "<channel-id>", "<chat-message-id>");
updateChannelMessage

Send only the properties to change — typically body with the new content. Note: Microsoft Graph v1.0 restricts which chatMessage properties may be updated (for example, policyViolation).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
payloadChatMessageYesThe message properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->updateChannelMessage("<team-id>", "<channel-id>", "<chat-message-id>", {body: {contentType: "html", content: "Hello team!"}});
setReactionChannelMessage

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->setReactionChannelMessage("<team-id>", "<channel-id>", "<chat-message-id>", {reactionType: "👍"});
softDeleteChannelMessage

Invoke action softDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->softDeleteChannelMessage("<team-id>", "<channel-id>", "<chat-message-id>");
undoSoftDeleteChannelMessage

Invoke action undoSoftDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->undoSoftDeleteChannelMessage("<team-id>", "<channel-id>", "<chat-message-id>");
unsetReactionChannelMessage

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->unsetReactionChannelMessage("<team-id>", "<channel-id>", "<chat-message-id>", {reactionType: "👍"});
countChannelMessages

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelMessagesQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelMessages("<team-id>", "<channel-id>");

Sample response:

"<value>"
getChannelMessagesDelta

Invoke function delta.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelMessagesDeltaQueriesNoQueries to be sent with the request

Returns: ChatMessageDeltaCollectionResponse|error

Sample code:

teams:ChatMessageDeltaCollectionResponse result = check teamsClient->getChannelMessagesDelta("<team-id>", "<channel-id>");

Sample response:

{"value": [ { ... } ]}
replyWithQuoteChannelMessages

Required payload fields: messageIds (id(s) of the message(s) being quoted, up to 10) and replyMessage (a chatMessage whose body.content holds the reply text). Note: on Microsoft Graph v1.0 replyWithQuote is documented for chats, so channel-scoped support may be limited.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadReplyWithQuoteRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageResponse|error

Sample code:

teams:ChatMessageResponse result = check teamsClient->replyWithQuoteChannelMessages("<team-id>", "<channel-id>", {replyMessage: {body: {contentType: "html", content: "Great point!"}}, messageIds: ["<message-id>"]});

Sample response:

{"id": "1616990852570", "messageType": "message", "createdDateTime": "2026-01-15T10:05:00Z", "body": {"contentType": "html", "content": "Great point!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}

Channels / messages / hosted contents

listChannelMessageHostedContents

List hostedContents.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelMessageHostedContentsQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContentCollectionResponse|error

Sample code:

teams:ChatMessageHostedContentCollectionResponse result = check teamsClient->listChannelMessageHostedContents("<team-id>", "<channel-id>", "<chat-message-id>");

Sample response:

{"value": [{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}]}
createChannelMessageHostedContent

Required payload fields: contentBytes (base64-encoded content) and contentType (the MIME type, for example "image/png"). Inline images are usually created together with the message instead, via the message's hostedContents array.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
payloadChatMessageHostedContentYesThe hosted content to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->createChannelMessageHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getChannelMessageHostedContent

Get hostedContents from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelMessageHostedContentQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->getChannelMessageHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
deleteChannelMessageHostedContent

Delete channel message hosted content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeleteChannelMessageHostedContentHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelMessageHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");
updateChannelMessageHostedContent

Sends hosted-content properties (contentBytes, contentType). Note: Microsoft Graph v1.0 offers limited support for updating message hosted content; this is provided for API completeness.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadChatMessageHostedContentYesThe hosted content properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->updateChannelMessageHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-hosted-content-id>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getChannelMessageHostedContentValue

List hostedContents.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: byte[]|error

Sample code:

byte[] result = check teamsClient->getChannelMessageHostedContentValue("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");
updateChannelMessageHostedContentValue

The payload is the raw media bytes (for example an image), uploaded as application/octet-stream.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadbyte[]YesNew media content
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->updateChannelMessageHostedContentValue("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-hosted-content-id>", content);
deleteChannelMessageHostedContentValue

Delete channel message hosted content value.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeleteChannelMessageHostedContentValueHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelMessageHostedContentValue("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");
countChannelMessageHostedContents

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelMessageHostedContentsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelMessageHostedContents("<team-id>", "<channel-id>", "<chat-message-id>");

Sample response:

"<value>"

Channels / messages / replies

listChannelMessageReplies

List replies.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelMessageRepliesQueriesNoQueries to be sent with the request

Returns: ChatMessageCollectionResponse|error

Sample code:

teams:ChatMessageCollectionResponse result = check teamsClient->listChannelMessageReplies("<team-id>", "<channel-id>", "<chat-message-id>");

Sample response:

{"value": [{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}]}
createChannelMessageReply

Required payload fields: body with a non-empty content (set body.contentType to "html" or "text"). Optional: attachments, mentions (referenced from HTML content by an at-mention tag), and hostedContents for inline images (each referenced by its @microsoft.graph.temporaryId).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
payloadChatMessageYesThe message to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->createChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", {body: {contentType: "html", content: "Hello team!"}});

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
getChannelMessageReply

Get chatMessage in a channel or chat.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelMessageReplyQueriesNoQueries to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->getChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>");

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
deleteChannelMessageReply

Delete channel message reply.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersDeleteChannelMessageReplyHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>");
updateChannelMessageReply

Send only the properties to change — typically body with the new content. Note: Microsoft Graph v1.0 restricts which chatMessage properties may be updated (for example, policyViolation).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadChatMessageYesThe message properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->updateChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", {body: {contentType: "html", content: "Hello team!"}});
setReactionChannelMessageReply

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->setReactionChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", {reactionType: "👍"});
softDeleteChannelMessageReply

Invoke action softDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->softDeleteChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>");
undoSoftDeleteChannelMessageReply

Invoke action undoSoftDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->undoSoftDeleteChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>");
unsetReactionChannelMessageReply

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->unsetReactionChannelMessageReply("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", {reactionType: "👍"});
countChannelMessageReplies

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelMessageRepliesQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelMessageReplies("<team-id>", "<channel-id>", "<chat-message-id>");

Sample response:

"<value>"
getChannelMessageRepliesDelta

Invoke function delta.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelMessageRepliesDeltaQueriesNoQueries to be sent with the request

Returns: ChatMessageDeltaCollectionResponse|error

Sample code:

teams:ChatMessageDeltaCollectionResponse result = check teamsClient->getChannelMessageRepliesDelta("<team-id>", "<channel-id>", "<chat-message-id>");

Sample response:

{"value": [ { ... } ]}
replyWithQuoteChannelMessageReplies

Required payload fields: messageIds (id(s) of the message(s) being quoted, up to 10) and replyMessage (a chatMessage whose body.content holds the reply text). Note: on Microsoft Graph v1.0 replyWithQuote is documented for chats, so channel-scoped support may be limited.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
payloadReplyWithQuoteRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageResponse|error

Sample code:

teams:ChatMessageResponse result = check teamsClient->replyWithQuoteChannelMessageReplies("<team-id>", "<channel-id>", "<chat-message-id>", {replyMessage: {body: {contentType: "html", content: "Great point!"}}, messageIds: ["<message-id>"]});

Sample response:

{"id": "1616990852570", "messageType": "message", "createdDateTime": "2026-01-15T10:05:00Z", "body": {"contentType": "html", "content": "Great point!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}

Channels / messages / replies / hosted contents

listChannelMessageReplyHostedContents

List hostedContents.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelMessageReplyHostedContentsQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContentCollectionResponse|error

Sample code:

teams:ChatMessageHostedContentCollectionResponse result = check teamsClient->listChannelMessageReplyHostedContents("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>");

Sample response:

{"value": [{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}]}
createChannelMessageReplyHostedContent

Required payload fields: contentBytes (base64-encoded content) and contentType (the MIME type, for example "image/png"). Inline images are usually created together with the message instead, via the message's hostedContents array.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadChatMessageHostedContentYesThe hosted content to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->createChannelMessageReplyHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getChannelMessageReplyHostedContent

Get hostedContents from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelMessageReplyHostedContentQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->getChannelMessageReplyHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
deleteChannelMessageReplyHostedContent

Delete channel reply hosted content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeleteChannelMessageReplyHostedContentHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelMessageReplyHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");
updateChannelMessageReplyHostedContent

Sends hosted-content properties (contentBytes, contentType). Note: Microsoft Graph v1.0 offers limited support for updating message hosted content; this is provided for API completeness.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadChatMessageHostedContentYesThe hosted content properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->updateChannelMessageReplyHostedContent("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getChannelMessageReplyHostedContentValue

List hostedContents.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: byte[]|error

Sample code:

byte[] result = check teamsClient->getChannelMessageReplyHostedContentValue("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");
updateChannelMessageReplyHostedContentValue

The payload is the raw media bytes (for example an image), uploaded as application/octet-stream.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadbyte[]YesNew media content
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->updateChannelMessageReplyHostedContentValue("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>", content);
deleteChannelMessageReplyHostedContentValue

Delete channel reply hosted content value.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeleteChannelMessageReplyHostedContentValueHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelMessageReplyHostedContentValue("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");
countChannelMessageReplyHostedContents

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelMessageReplyHostedContentsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelMessageReplyHostedContents("<team-id>", "<channel-id>", "<chat-message-id>", "<chat-message-id1>");

Sample response:

"<value>"

Channels / tabs

listChannelTabs

List tabs in channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListChannelTabsQueriesNoQueries to be sent with the request

Returns: TeamsTabCollectionResponse|error

Sample code:

teams:TeamsTabCollectionResponse result = check teamsClient->listChannelTabs("<team-id>", "<channel-id>");

Sample response:

{"value": [{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}]}
createChannelTab

Required payload fields: displayName and the [email protected] navigation binding (https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{app-id}); the app must already be installed in the team. configuration (entityId, contentUrl, ...) is optional. For a static tab, omit displayName/configuration — Graph reads them from the app manifest and otherwise returns 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
payloadTeamsTabYesThe tab to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: TeamsTab|error

Sample code:

teams:TeamsTab result = check teamsClient->createChannelTab("<team-id>", "<channel-id>", {displayName: "My Tab", "[email protected]": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/<app-id>"});

Sample response:

{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}
getChannelTab

Get tab.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
teamsTabIdstringYesThe unique identifier of teamsTab
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelTabQueriesNoQueries to be sent with the request

Returns: TeamsTab|error

Sample code:

teams:TeamsTab result = check teamsClient->getChannelTab("<team-id>", "<channel-id>", "<teams-tab-id>");

Sample response:

{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}
deleteChannelTab

Delete tab from channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
teamsTabIdstringYesThe unique identifier of teamsTab
headersDeleteChannelTabHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteChannelTab("<team-id>", "<channel-id>", "<teams-tab-id>");
updateChannelTab

No fields are required; send only the tab properties to change (for example displayName, configuration).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
teamsTabIdstringYesThe unique identifier of teamsTab
payloadTeamsTabYesThe tab properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: TeamsTab|error

Sample code:

teams:TeamsTab result = check teamsClient->updateChannelTab("<team-id>", "<channel-id>", "<teams-tab-id>", {displayName: "My Tab"});

Sample response:

{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}
getChannelTabTeamsApp

Get teamsApp from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
teamsTabIdstringYesThe unique identifier of teamsTab
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetChannelTabTeamsAppQueriesNoQueries to be sent with the request

Returns: TeamsApp|error

Sample code:

teams:TeamsApp result = check teamsClient->getChannelTabTeamsApp("<team-id>", "<channel-id>", "<teams-tab-id>");

Sample response:

{"id": "<app-id>", "externalId": null, "displayName": "Planner", "distributionMethod": "store"}
countChannelTabs

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountChannelTabsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countChannelTabs("<team-id>", "<channel-id>");

Sample response:

"<value>"

Incoming channels

listIncomingChannels

List incomingChannels.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListIncomingChannelsQueriesNoQueries to be sent with the request

Returns: ChannelCollectionResponse|error

Sample code:

teams:ChannelCollectionResponse result = check teamsClient->listIncomingChannels("<team-id>");

Sample response:

{"value": [{"id": "<channel-id>", "displayName": "Announcements", "description": null, "membershipType": "standard", "webUrl": "https://teams.microsoft.com/l/channel/..."}]}
getIncomingChannel

Get incomingChannels from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
channelIdstringYesThe unique identifier of channel
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetIncomingChannelQueriesNoQueries to be sent with the request

Returns: Channel|error

Sample code:

teams:Channel result = check teamsClient->getIncomingChannel("<team-id>", "<channel-id>");

Sample response:

{"id": "<channel-id>", "displayName": "Announcements", "description": null, "membershipType": "standard", "webUrl": "https://teams.microsoft.com/l/channel/..."}
countIncomingChannels

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountIncomingChannelsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countIncomingChannels("<team-id>");

Sample response:

"<value>"

Members

listMembers

List members of team.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListMembersQueriesNoQueries to be sent with the request

Returns: ConversationMemberCollectionResponse|error

Sample code:

teams:ConversationMemberCollectionResponse result = check teamsClient->listMembers("<team-id>");

Sample response:

{"value": [{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}]}
createMember

Required payload fields: the [email protected] navigation binding (https://graph.microsoft.com/v1.0/users('{user-id}')) and roles (["owner"] for an owner, [] for a standard member).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadConversationMemberYesThe member to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->createMember("<team-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
getMember

Get member of team.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetMemberQueriesNoQueries to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->getMember("<team-id>", "<conversation-member-id>");

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
deleteMember

Remove member from team.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
headersDeleteMemberHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteMember("<team-id>", "<conversation-member-id>");
updateMember

Required payload field: roles (the new role set — ["owner"] to promote to owner, [] to demote to a standard member).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
payloadConversationMemberYesThe member properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->updateMember("<team-id>", "<conversation-member-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"]});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
countMembers

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountMembersQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countMembers("<team-id>");

Sample response:

"<value>"
addMembers

Required: a non-empty values array (up to 200 members per call). Each entry requires the [email protected] binding and roles (["owner"] or []).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->addMembers("<team-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}
removeMembers

Required: a non-empty values array (up to 20 members per call). Each entry identifies the member to remove by the [email protected] binding (https://graph.microsoft.com/v1.0/users('{user-id}')).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->removeMembers("<team-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}

Send activity notification

sendActivityNotification

Required payload fields: topic (with source and value), activityType (the reserved systemDefault, or a type declared in the team's app manifest), previewText (an item body with content), and recipient (for example an aadUserNotificationRecipient with a userId). Add templateParameters when the activity text contains placeholders.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadSendActivityNotificationRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->sendActivityNotification("<team-id>", {topic: <teams:TeamworkActivityTopic>{atOdataType: "#microsoft.graph.teamworkActivityTopic", 'source: "entityUrl", value: "https://graph.microsoft.com/v1.0/teams/<team-id>"}, activityType: "taskCreated", previewText: <teams:ItemBody>{content: "You have a new notification"}, recipient: <teams:TeamworkNotificationRecipient>{atOdataType: "#microsoft.graph.aadUserNotificationRecipient", "userId": "<user-id>"}});

Primary channel

getPrimaryChannel

Get primaryChannel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelQueriesNoQueries to be sent with the request

Returns: Channel|error

Sample code:

teams:Channel result = check teamsClient->getPrimaryChannel("<team-id>");

Sample response:

{"id": "<channel-id>", "displayName": "Announcements", "description": null, "membershipType": "standard", "webUrl": "https://teams.microsoft.com/l/channel/..."}
deletePrimaryChannel

Delete primary channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersDeletePrimaryChannelHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannel("<team-id>");
updatePrimaryChannel

No fields are required; send only the properties to change. primaryChannel is the team's General channel, whose displayName can't be changed (its description and settings can).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadChannelYesThe channel properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->updatePrimaryChannel("<team-id>", {description: "Team-wide announcements and updates"});

Primary channel / all members

listPrimaryChannelAllMembers

Get allMembers from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelAllMembersQueriesNoQueries to be sent with the request

Returns: ConversationMemberCollectionResponse|error

Sample code:

teams:ConversationMemberCollectionResponse result = check teamsClient->listPrimaryChannelAllMembers("<team-id>");

Sample response:

{"value": [{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}]}
createPrimaryChannelAllMember

Required payload fields: the [email protected] navigation binding (https://graph.microsoft.com/v1.0/users('{user-id}')) and roles (["owner"] for an owner, [] for a standard member). Members can be added only to private and shared channels, and the user must already belong to the parent team's roster.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadConversationMemberYesThe member to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->createPrimaryChannelAllMember("<team-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
getPrimaryChannelAllMember

Get allMembers from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelAllMemberQueriesNoQueries to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->getPrimaryChannelAllMember("<team-id>", "<conversation-member-id>");

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
deletePrimaryChannelAllMember

Remove member from primary channel allMembers.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
headersDeletePrimaryChannelAllMemberHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelAllMember("<team-id>", "<conversation-member-id>");
updatePrimaryChannelAllMember

Required payload field: roles (the new role set — ["owner"] to promote to owner, [] to demote to a standard member).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
payloadConversationMemberYesThe member properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->updatePrimaryChannelAllMember("<team-id>", "<conversation-member-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"]});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
countPrimaryChannelAllMembers

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelAllMembersQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelAllMembers("<team-id>");

Sample response:

"<value>"
addPrimaryChannelAllMembers

Required: a non-empty values array (up to 200 members per call). Each entry requires the [email protected] binding and roles (["owner"] or []).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->addPrimaryChannelAllMembers("<team-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}
removePrimaryChannelAllMembers

Required: a non-empty values array (up to 20 members per call). Each entry identifies the member to remove by the [email protected] binding (https://graph.microsoft.com/v1.0/users('{user-id}')).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->removePrimaryChannelAllMembers("<team-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}

Primary channel / enabled apps

listPrimaryChannelEnabledApps

Get enabledApps from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelEnabledAppsQueriesNoQueries to be sent with the request

Returns: TeamsAppCollectionResponse|error

Sample code:

teams:TeamsAppCollectionResponse result = check teamsClient->listPrimaryChannelEnabledApps("<team-id>");

Sample response:

{"value": [{"id": "<app-id>", "externalId": null, "displayName": "Planner", "distributionMethod": "store"}]}
getPrimaryChannelEnabledApp

Get enabledApps from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamsAppIdstringYesThe unique identifier of teamsApp
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelEnabledAppQueriesNoQueries to be sent with the request

Returns: TeamsApp|error

Sample code:

teams:TeamsApp result = check teamsClient->getPrimaryChannelEnabledApp("<team-id>", "<teams-app-id>");

Sample response:

{"id": "<app-id>", "externalId": null, "displayName": "Planner", "distributionMethod": "store"}
countPrimaryChannelEnabledApps

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelEnabledAppsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelEnabledApps("<team-id>");

Sample response:

"<value>"

Primary channel / files folder

getPrimaryChannelFilesFolder

Get filesFolder from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelFilesFolderQueriesNoQueries to be sent with the request

Returns: DriveItem|error

Sample code:

teams:DriveItem result = check teamsClient->getPrimaryChannelFilesFolder("<team-id>");

Sample response:

{"id": "<item-id>", "name": "Documents", "webUrl": "https://contoso.sharepoint.com/...", "size": 0, "folder": {"childCount": 4}}
getPrimaryChannelFilesFolderContent

Get primary channel filesFolder content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelFilesFolderContentQueriesNoQueries to be sent with the request

Returns: byte[]|error

Sample code:

byte[] result = check teamsClient->getPrimaryChannelFilesFolderContent("<team-id>");
updatePrimaryChannelFilesFolderContent

The payload is the raw file content, uploaded as application/octet-stream. Simple upload supports files up to ~250 MB; larger files require an upload session, which this operation doesn't provide.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadbyte[]YesNew media content
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: DriveItem|error

Sample code:

teams:DriveItem result = check teamsClient->updatePrimaryChannelFilesFolderContent("<team-id>", content);

Sample response:

{"id": "<item-id>", "name": "Documents", "webUrl": "https://contoso.sharepoint.com/...", "size": 0, "folder": {"childCount": 4}}
deletePrimaryChannelFilesFolderContent

Delete primary channel filesFolder content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersDeletePrimaryChannelFilesFolderContentHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelFilesFolderContent("<team-id>");

Primary channel / members

listPrimaryChannelMembers

Get members from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelMembersQueriesNoQueries to be sent with the request

Returns: ConversationMemberCollectionResponse|error

Sample code:

teams:ConversationMemberCollectionResponse result = check teamsClient->listPrimaryChannelMembers("<team-id>");

Sample response:

{"value": [{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}]}
createPrimaryChannelMember

Required payload fields: the [email protected] navigation binding (https://graph.microsoft.com/v1.0/users('{user-id}')) and roles (["owner"] for an owner, [] for a standard member). Members can be added only to private and shared channels, and the user must already belong to the parent team's roster.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadConversationMemberYesThe member to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->createPrimaryChannelMember("<team-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
getPrimaryChannelMember

Get members from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelMemberQueriesNoQueries to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->getPrimaryChannelMember("<team-id>", "<conversation-member-id>");

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
deletePrimaryChannelMember

Remove member from primary channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
headersDeletePrimaryChannelMemberHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelMember("<team-id>", "<conversation-member-id>");
updatePrimaryChannelMember

Required payload field: roles (the new role set — ["owner"] to promote to owner, [] to demote to a standard member).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
conversationMemberIdstringYesThe unique identifier of conversationMember
payloadConversationMemberYesThe member properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ConversationMember|error

Sample code:

teams:ConversationMember result = check teamsClient->updatePrimaryChannelMember("<team-id>", "<conversation-member-id>", {"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"]});

Sample response:

{"@odata.type": "#microsoft.graph.aadUserConversationMember", "id": "<membership-id>", "roles": ["owner"], "displayName": "Alex Johnson", "userId": "<user-id>", "email": "[email protected]"}
countPrimaryChannelMembers

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelMembersQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelMembers("<team-id>");

Sample response:

"<value>"
addPrimaryChannelMembers

Required: a non-empty values array (up to 200 members per call). Each entry requires the [email protected] binding and roles (["owner"] or []).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->addPrimaryChannelMembers("<team-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}
removePrimaryChannelMembers

Required: a non-empty values array (up to 20 members per call). Each entry identifies the member to remove by the [email protected] binding (https://graph.microsoft.com/v1.0/users('{user-id}')).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadAddMembersRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ActionResultPartCollectionResponse|error

Sample code:

teams:ActionResultPartCollectionResponse result = check teamsClient->removePrimaryChannelMembers("<team-id>", {values: [{"@odata.type": "#microsoft.graph.aadUserConversationMember", roles: ["owner"], "[email protected]": "https://graph.microsoft.com/v1.0/users('<user-id>')"}]});

Sample response:

{"value": [ { ... } ]}

Primary channel / messages

listPrimaryChannelMessages

Get messages from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelMessagesQueriesNoQueries to be sent with the request

Returns: ChatMessageCollectionResponse|error

Sample code:

teams:ChatMessageCollectionResponse result = check teamsClient->listPrimaryChannelMessages("<team-id>");

Sample response:

{"value": [{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}]}
createPrimaryChannelMessage

Required payload fields: body with a non-empty content (set body.contentType to "html" or "text"). Optional: attachments, mentions (referenced from HTML content by an at-mention tag), and hostedContents for inline images (each referenced by its @microsoft.graph.temporaryId).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadChatMessageYesThe message to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->createPrimaryChannelMessage("<team-id>", {body: {contentType: "html", content: "Hello team!"}});

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
getPrimaryChannelMessage

Get messages from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelMessageQueriesNoQueries to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->getPrimaryChannelMessage("<team-id>", "<chat-message-id>");

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
deletePrimaryChannelMessage

Delete primary channel message.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersDeletePrimaryChannelMessageHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelMessage("<team-id>", "<chat-message-id>");
updatePrimaryChannelMessage

Send only the properties to change — typically body with the new content. Note: Microsoft Graph v1.0 restricts which chatMessage properties may be updated (for example, policyViolation).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
payloadChatMessageYesThe message properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->updatePrimaryChannelMessage("<team-id>", "<chat-message-id>", {body: {contentType: "html", content: "Hello team!"}});
setReactionPrimaryChannelMessage

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->setReactionPrimaryChannelMessage("<team-id>", "<chat-message-id>", {reactionType: "👍"});
softDeletePrimaryChannelMessage

Invoke action softDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->softDeletePrimaryChannelMessage("<team-id>", "<chat-message-id>");
undoSoftDeletePrimaryChannelMessage

Invoke action undoSoftDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->undoSoftDeletePrimaryChannelMessage("<team-id>", "<chat-message-id>");
unsetReactionPrimaryChannelMessage

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->unsetReactionPrimaryChannelMessage("<team-id>", "<chat-message-id>", {reactionType: "👍"});
countPrimaryChannelMessages

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelMessagesQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelMessages("<team-id>");

Sample response:

"<value>"
getPrimaryChannelMessagesDelta

Invoke function delta.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelMessagesDeltaQueriesNoQueries to be sent with the request

Returns: ChatMessageDeltaCollectionResponse|error

Sample code:

teams:ChatMessageDeltaCollectionResponse result = check teamsClient->getPrimaryChannelMessagesDelta("<team-id>");

Sample response:

{"value": [ { ... } ]}
replyWithQuotePrimaryChannelMessages

Required payload fields: messageIds (id(s) of the message(s) being quoted, up to 10) and replyMessage (a chatMessage whose body.content holds the reply text). Note: on Microsoft Graph v1.0 replyWithQuote is documented for chats, so channel-scoped support may be limited.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadReplyWithQuoteRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageResponse|error

Sample code:

teams:ChatMessageResponse result = check teamsClient->replyWithQuotePrimaryChannelMessages("<team-id>", {replyMessage: {body: {contentType: "html", content: "Great point!"}}, messageIds: ["<message-id>"]});

Sample response:

{"id": "1616990852570", "messageType": "message", "createdDateTime": "2026-01-15T10:05:00Z", "body": {"contentType": "html", "content": "Great point!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}

Primary channel / messages / hosted contents

listPrimaryChannelMessageHostedContents

Get hostedContents from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelMessageHostedContentsQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContentCollectionResponse|error

Sample code:

teams:ChatMessageHostedContentCollectionResponse result = check teamsClient->listPrimaryChannelMessageHostedContents("<team-id>", "<chat-message-id>");

Sample response:

{"value": [{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}]}
createPrimaryChannelMessageHostedContent

Required payload fields: contentBytes (base64-encoded content) and contentType (the MIME type, for example "image/png"). Inline images are usually created together with the message instead, via the message's hostedContents array.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
payloadChatMessageHostedContentYesThe hosted content to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->createPrimaryChannelMessageHostedContent("<team-id>", "<chat-message-id>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getPrimaryChannelMessageHostedContent

Get hostedContents from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelMessageHostedContentQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->getPrimaryChannelMessageHostedContent("<team-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
deletePrimaryChannelMessageHostedContent

Delete primary channel message hosted content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeletePrimaryChannelMessageHostedContentHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelMessageHostedContent("<team-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");
updatePrimaryChannelMessageHostedContent

Sends hosted-content properties (contentBytes, contentType). Note: Microsoft Graph v1.0 offers limited support for updating message hosted content; this is provided for API completeness.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadChatMessageHostedContentYesThe hosted content properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->updatePrimaryChannelMessageHostedContent("<team-id>", "<chat-message-id>", "<chat-message-hosted-content-id>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getPrimaryChannelMessageHostedContentValue

Get primary channel message hosted content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: byte[]|error

Sample code:

byte[] result = check teamsClient->getPrimaryChannelMessageHostedContentValue("<team-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");
updatePrimaryChannelMessageHostedContentValue

The payload is the raw media bytes (for example an image), uploaded as application/octet-stream.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadbyte[]YesNew media content
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->updatePrimaryChannelMessageHostedContentValue("<team-id>", "<chat-message-id>", "<chat-message-hosted-content-id>", content);
deletePrimaryChannelMessageHostedContentValue

Delete primary channel message hosted content value.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeletePrimaryChannelMessageHostedContentValueHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelMessageHostedContentValue("<team-id>", "<chat-message-id>", "<chat-message-hosted-content-id>");
countPrimaryChannelMessageHostedContents

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelMessageHostedContentsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelMessageHostedContents("<team-id>", "<chat-message-id>");

Sample response:

"<value>"

Primary channel / messages / replies

listPrimaryChannelMessageReplies

Get replies from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelMessageRepliesQueriesNoQueries to be sent with the request

Returns: ChatMessageCollectionResponse|error

Sample code:

teams:ChatMessageCollectionResponse result = check teamsClient->listPrimaryChannelMessageReplies("<team-id>", "<chat-message-id>");

Sample response:

{"value": [{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}]}
createPrimaryChannelMessageReply

Required payload fields: body with a non-empty content (set body.contentType to "html" or "text"). Optional: attachments, mentions (referenced from HTML content by an at-mention tag), and hostedContents for inline images (each referenced by its @microsoft.graph.temporaryId).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
payloadChatMessageYesThe message to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->createPrimaryChannelMessageReply("<team-id>", "<chat-message-id>", {body: {contentType: "html", content: "Hello team!"}});

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
getPrimaryChannelMessageReply

Get replies from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelMessageReplyQueriesNoQueries to be sent with the request

Returns: ChatMessage|error

Sample code:

teams:ChatMessage result = check teamsClient->getPrimaryChannelMessageReply("<team-id>", "<chat-message-id>", "<chat-message-id1>");

Sample response:

{"id": "1616990852569", "messageType": "message", "createdDateTime": "2026-01-15T10:00:00Z", "body": {"contentType": "html", "content": "Hello team!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}
deletePrimaryChannelMessageReply

Delete primary channel message reply.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersDeletePrimaryChannelMessageReplyHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelMessageReply("<team-id>", "<chat-message-id>", "<chat-message-id1>");
updatePrimaryChannelMessageReply

Send only the properties to change — typically body with the new content. Note: Microsoft Graph v1.0 restricts which chatMessage properties may be updated (for example, policyViolation).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadChatMessageYesThe message properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: http:Response|error

Sample code:

http:Response result = check teamsClient->updatePrimaryChannelMessageReply("<team-id>", "<chat-message-id>", "<chat-message-id1>", {body: {contentType: "html", content: "Hello team!"}});
setReactionPrimaryChannelMessageReply

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->setReactionPrimaryChannelMessageReply("<team-id>", "<chat-message-id>", "<chat-message-id1>", {reactionType: "👍"});
softDeletePrimaryChannelMessageReply

Invoke action softDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->softDeletePrimaryChannelMessageReply("<team-id>", "<chat-message-id>", "<chat-message-id1>");
undoSoftDeletePrimaryChannelMessageReply

Invoke action undoSoftDelete.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->undoSoftDeletePrimaryChannelMessageReply("<team-id>", "<chat-message-id>", "<chat-message-id1>");
unsetReactionPrimaryChannelMessageReply

Required payload field: reactionType. On Microsoft Graph v1.0 this must be a Unicode emoji (for example "👍"); reaction names such as "like" are rejected with HTTP 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadSetReactionRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->unsetReactionPrimaryChannelMessageReply("<team-id>", "<chat-message-id>", "<chat-message-id1>", {reactionType: "👍"});
countPrimaryChannelMessageReplies

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelMessageRepliesQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelMessageReplies("<team-id>", "<chat-message-id>");

Sample response:

"<value>"
getPrimaryChannelMessageRepliesDelta

Invoke function delta.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelMessageRepliesDeltaQueriesNoQueries to be sent with the request

Returns: ChatMessageDeltaCollectionResponse|error

Sample code:

teams:ChatMessageDeltaCollectionResponse result = check teamsClient->getPrimaryChannelMessageRepliesDelta("<team-id>", "<chat-message-id>");

Sample response:

{"value": [ { ... } ]}
replyWithQuotePrimaryChannelMessageReplies

Required payload fields: messageIds (id(s) of the message(s) being quoted, up to 10) and replyMessage (a chatMessage whose body.content holds the reply text). Note: on Microsoft Graph v1.0 replyWithQuote is documented for chats, so channel-scoped support may be limited.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
payloadReplyWithQuoteRequestYesAction parameters
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageResponse|error

Sample code:

teams:ChatMessageResponse result = check teamsClient->replyWithQuotePrimaryChannelMessageReplies("<team-id>", "<chat-message-id>", {replyMessage: {body: {contentType: "html", content: "Great point!"}}, messageIds: ["<message-id>"]});

Sample response:

{"id": "1616990852570", "messageType": "message", "createdDateTime": "2026-01-15T10:05:00Z", "body": {"contentType": "html", "content": "Great point!"}, "from": {"user": {"id": "<user-id>", "displayName": "Alex Johnson"}}}

Primary channel / messages / replies / hosted contents

listPrimaryChannelMessageReplyHostedContents

Get hostedContents from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelMessageReplyHostedContentsQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContentCollectionResponse|error

Sample code:

teams:ChatMessageHostedContentCollectionResponse result = check teamsClient->listPrimaryChannelMessageReplyHostedContents("<team-id>", "<chat-message-id>", "<chat-message-id1>");

Sample response:

{"value": [{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}]}
createPrimaryChannelMessageReplyHostedContent

Required payload fields: contentBytes (base64-encoded content) and contentType (the MIME type, for example "image/png"). Inline images are usually created together with the message instead, via the message's hostedContents array.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
payloadChatMessageHostedContentYesThe hosted content to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->createPrimaryChannelMessageReplyHostedContent("<team-id>", "<chat-message-id>", "<chat-message-id1>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getPrimaryChannelMessageReplyHostedContent

Get hostedContents from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelMessageReplyHostedContentQueriesNoQueries to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->getPrimaryChannelMessageReplyHostedContent("<team-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
deletePrimaryChannelMessageReplyHostedContent

Delete primary channel reply hosted content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeletePrimaryChannelMessageReplyHostedContentHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelMessageReplyHostedContent("<team-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");
updatePrimaryChannelMessageReplyHostedContent

Sends hosted-content properties (contentBytes, contentType). Note: Microsoft Graph v1.0 offers limited support for updating message hosted content; this is provided for API completeness.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadChatMessageHostedContentYesThe hosted content properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: ChatMessageHostedContent|error

Sample code:

teams:ChatMessageHostedContent result = check teamsClient->updatePrimaryChannelMessageReplyHostedContent("<team-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>", {"@microsoft.graph.temporaryId": "1", contentBytes: "<base64>", contentType: "image/png"});

Sample response:

{"id": "<hosted-content-id>", "contentType": "image/png", "contentBytes": "<base64>"}
getPrimaryChannelMessageReplyHostedContentValue

Get primary channel reply hosted content.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: byte[]|error

Sample code:

byte[] result = check teamsClient->getPrimaryChannelMessageReplyHostedContentValue("<team-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");
updatePrimaryChannelMessageReplyHostedContentValue

The payload is the raw media bytes (for example an image), uploaded as application/octet-stream.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
payloadbyte[]YesNew media content
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->updatePrimaryChannelMessageReplyHostedContentValue("<team-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>", content);
deletePrimaryChannelMessageReplyHostedContentValue

Delete primary channel reply hosted content value.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
chatMessageHostedContentIdstringYesThe unique identifier of chatMessageHostedContent
headersDeletePrimaryChannelMessageReplyHostedContentValueHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelMessageReplyHostedContentValue("<team-id>", "<chat-message-id>", "<chat-message-id1>", "<chat-message-hosted-content-id>");
countPrimaryChannelMessageReplyHostedContents

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
chatMessageIdstringYesThe unique identifier of chatMessage
chatMessageId1stringYesThe unique identifier of chatMessage
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelMessageReplyHostedContentsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelMessageReplyHostedContents("<team-id>", "<chat-message-id>", "<chat-message-id1>");

Sample response:

"<value>"

Primary channel / tabs

listPrimaryChannelTabs

Get tabs from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListPrimaryChannelTabsQueriesNoQueries to be sent with the request

Returns: TeamsTabCollectionResponse|error

Sample code:

teams:TeamsTabCollectionResponse result = check teamsClient->listPrimaryChannelTabs("<team-id>");

Sample response:

{"value": [{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}]}
createPrimaryChannelTab

Required payload fields: displayName and the [email protected] navigation binding (https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{app-id}); the app must already be installed in the team. configuration (entityId, contentUrl, ...) is optional. For a static tab, omit displayName/configuration — Graph reads them from the app manifest and otherwise returns 400.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadTeamsTabYesThe tab to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: TeamsTab|error

Sample code:

teams:TeamsTab result = check teamsClient->createPrimaryChannelTab("<team-id>", {displayName: "My Tab", "[email protected]": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/<app-id>"});

Sample response:

{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}
getPrimaryChannelTab

Get tabs from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamsTabIdstringYesThe unique identifier of teamsTab
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelTabQueriesNoQueries to be sent with the request

Returns: TeamsTab|error

Sample code:

teams:TeamsTab result = check teamsClient->getPrimaryChannelTab("<team-id>", "<teams-tab-id>");

Sample response:

{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}
deletePrimaryChannelTab

Delete tab from primary channel.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamsTabIdstringYesThe unique identifier of teamsTab
headersDeletePrimaryChannelTabHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deletePrimaryChannelTab("<team-id>", "<teams-tab-id>");
updatePrimaryChannelTab

No fields are required; send only the tab properties to change (for example displayName, configuration).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamsTabIdstringYesThe unique identifier of teamsTab
payloadTeamsTabYesThe tab properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: TeamsTab|error

Sample code:

teams:TeamsTab result = check teamsClient->updatePrimaryChannelTab("<team-id>", "<teams-tab-id>", {displayName: "My Tab"});

Sample response:

{"id": "<tab-id>", "displayName": "My Tab", "webUrl": "https://teams.microsoft.com/l/entity/...", "configuration": {"entityId": "...", "contentUrl": "..."}}
getPrimaryChannelTabTeamsApp

Get teamsApp from teams.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamsTabIdstringYesThe unique identifier of teamsTab
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetPrimaryChannelTabTeamsAppQueriesNoQueries to be sent with the request

Returns: TeamsApp|error

Sample code:

teams:TeamsApp result = check teamsClient->getPrimaryChannelTabTeamsApp("<team-id>", "<teams-tab-id>");

Sample response:

{"id": "<app-id>", "externalId": null, "displayName": "Planner", "distributionMethod": "store"}
countPrimaryChannelTabs

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountPrimaryChannelTabsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countPrimaryChannelTabs("<team-id>");

Sample response:

"<value>"

Tags

listTags

List teamworkTags.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListTagsQueriesNoQueries to be sent with the request

Returns: TeamworkTagCollectionResponse|error

Sample code:

teams:TeamworkTagCollectionResponse result = check teamsClient->listTags("<team-id>");

Sample response:

{"value": [{"id": "<tag-id>", "displayName": "Engineering", "memberCount": 3, "teamId": "<team-id>"}]}
createTag

Required payload fields: displayName (max 40 characters) and a non-empty members array (max 25) — each member is a teamworkTagMember identified by userId. At least one member is required.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
payloadTeamworkTagYesThe tag to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: TeamworkTag|error

Sample code:

teams:TeamworkTag result = check teamsClient->createTag("<team-id>", {displayName: "Engineering", "members": [{"userId": "<user-id>"}]});

Sample response:

{"id": "<tag-id>", "displayName": "Engineering", "memberCount": 3, "teamId": "<team-id>"}
getTag

Get teamworkTag.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetTagQueriesNoQueries to be sent with the request

Returns: TeamworkTag|error

Sample code:

teams:TeamworkTag result = check teamsClient->getTag("<team-id>", "<teamwork-tag-id>");

Sample response:

{"id": "<tag-id>", "displayName": "Engineering", "memberCount": 3, "teamId": "<team-id>"}
deleteTag

Delete teamworkTag.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
headersDeleteTagHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteTag("<team-id>", "<teamwork-tag-id>");
updateTag

Required payload field: displayName (the only editable property of a teamworkTag).

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
payloadTeamworkTagYesThe tag properties to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: TeamworkTag|error

Sample code:

teams:TeamworkTag result = check teamsClient->updateTag("<team-id>", "<teamwork-tag-id>", {displayName: "Engineering"});

Sample response:

{"id": "<tag-id>", "displayName": "Engineering", "memberCount": 3, "teamId": "<team-id>"}
countTags

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountTagsQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countTags("<team-id>");

Sample response:

"<value>"

Tags / members

listTagMembers

List members in a teamworkTag.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
headersmap<string|string[]>NoHeaders to be sent with the request
queries*ListTagMembersQueriesNoQueries to be sent with the request

Returns: TeamworkTagMemberCollectionResponse|error

Sample code:

teams:TeamworkTagMemberCollectionResponse result = check teamsClient->listTagMembers("<team-id>", "<teamwork-tag-id>");

Sample response:

{"value": [{"id": "<tag-member-id>", "displayName": "Alex Johnson", "userId": "<user-id>", "tenantId": "<tenant-id>"}]}
createTagMember

Required payload field: userId — the object id of a user who is a member of the team.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
payloadTeamworkTagMemberYesThe tag member to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: TeamworkTagMember|error

Sample code:

teams:TeamworkTagMember result = check teamsClient->createTagMember("<team-id>", "<teamwork-tag-id>", {"userId": "<user-id>"});

Sample response:

{"id": "<tag-member-id>", "displayName": "Alex Johnson", "userId": "<user-id>", "tenantId": "<tenant-id>"}
getTagMember

Get teamworkTagMember.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
teamworkTagMemberIdstringYesThe unique identifier of teamworkTagMember
headersmap<string|string[]>NoHeaders to be sent with the request
queries*GetTagMemberQueriesNoQueries to be sent with the request

Returns: TeamworkTagMember|error

Sample code:

teams:TeamworkTagMember result = check teamsClient->getTagMember("<team-id>", "<teamwork-tag-id>", "<teamwork-tag-member-id>");

Sample response:

{"id": "<tag-member-id>", "displayName": "Alex Johnson", "userId": "<user-id>", "tenantId": "<tenant-id>"}
deleteTagMember

Delete teamworkTagMember.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
teamworkTagMemberIdstringYesThe unique identifier of teamworkTagMember
headersDeleteTagMemberHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check teamsClient->deleteTagMember("<team-id>", "<teamwork-tag-id>", "<teamwork-tag-member-id>");
countTagMembers

Get the number of the resource.

Parameters:

NameTypeRequiredDescription
teamIdstringYesThe unique identifier of team
teamworkTagIdstringYesThe unique identifier of teamworkTag
headersmap<string|string[]>NoHeaders to be sent with the request
queries*CountTagMembersQueriesNoQueries to be sent with the request

Returns: string|error

Sample code:

string result = check teamsClient->countTagMembers("<team-id>", "<teamwork-tag-id>");

Sample response:

"<value>"