Actions
The ballerinax/microsoft.teams package exposes the following clients:
| Client | Purpose |
|---|---|
Client | Manage 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
| Field | Type | Default | Description |
|---|---|---|---|
auth | OAuth2ClientCredentialsGrantConfig | BearerTokenConfig | OAuth2RefreshTokenGrantConfig | Required | OAuth 2.0 credentials: client-credentials (app-only), a bearer token, or a refresh-token grant. |
timeout | decimal | 30 | Maximum time (seconds) to wait for a response. |
httpVersion | http:HttpVersion | HTTP_2_0 | HTTP 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:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Team | Yes | The team to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetTeamQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | DeleteTeamHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | Team | Yes | New property values |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListAllChannelsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetAllChannelQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountAllChannelsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | Channel | Yes | The channel to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | DeleteChannelHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | Channel | Yes | The channel properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetAllChannelMessagesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetAllRetainedChannelMessagesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelAllMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | ConversationMember | Yes | The member to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelAllMemberQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | DeleteChannelAllMemberHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
payload | ConversationMember | Yes | The member properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelAllMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelEnabledAppsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
teamsAppId | string | Yes | The unique identifier of teamsApp |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelEnabledAppQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelEnabledAppsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelFilesFolderQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelFilesFolderContentQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | byte[] | Yes | New media content |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | DeleteChannelFilesFolderContentHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | ConversationMember | Yes | The member to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelMemberQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | DeleteChannelMemberHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
payload | ConversationMember | Yes | The member properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelMessagesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | ChatMessage | Yes | The message to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelMessageQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | DeleteChannelMessageHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ChatMessage | Yes | The message properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelMessagesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelMessagesDeltaQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | ReplyWithQuoteRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelMessageHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ChatMessageHostedContent | Yes | The hosted content to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelMessageHostedContentQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeleteChannelMessageHostedContentHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | ChatMessageHostedContent | Yes | The hosted content properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | byte[] | Yes | New media content |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeleteChannelMessageHostedContentValueHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelMessageHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelMessageRepliesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ChatMessage | Yes | The message to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelMessageReplyQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | DeleteChannelMessageReplyHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | ChatMessage | Yes | The message properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelMessageRepliesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelMessageRepliesDeltaQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ReplyWithQuoteRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelMessageReplyHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | ChatMessageHostedContent | Yes | The hosted content to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelMessageReplyHostedContentQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeleteChannelMessageReplyHostedContentHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | ChatMessageHostedContent | Yes | The hosted content properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | byte[] | Yes | New media content |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeleteChannelMessageReplyHostedContentValueHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelMessageReplyHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListChannelTabsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
payload | TeamsTab | Yes | The tab to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
teamsTabId | string | Yes | The unique identifier of teamsTab |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelTabQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
teamsTabId | string | Yes | The unique identifier of teamsTab |
headers | DeleteChannelTabHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
teamsTabId | string | Yes | The unique identifier of teamsTab |
payload | TeamsTab | Yes | The tab properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
teamsTabId | string | Yes | The unique identifier of teamsTab |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetChannelTabTeamsAppQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountChannelTabsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListIncomingChannelsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
channelId | string | Yes | The unique identifier of channel |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetIncomingChannelQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountIncomingChannelsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | ConversationMember | Yes | The member to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetMemberQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | DeleteMemberHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
payload | ConversationMember | Yes | The member properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | SendActivityNotificationRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | DeletePrimaryChannelHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | Channel | Yes | The channel properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelAllMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | ConversationMember | Yes | The member to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelAllMemberQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | DeletePrimaryChannelAllMemberHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
payload | ConversationMember | Yes | The member properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelAllMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelEnabledAppsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamsAppId | string | Yes | The unique identifier of teamsApp |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelEnabledAppQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelEnabledAppsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelFilesFolderQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelFilesFolderContentQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | byte[] | Yes | New media content |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | DeletePrimaryChannelFilesFolderContentHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check teamsClient->deletePrimaryChannelFilesFolderContent("<team-id>");
Primary channel / members
listPrimaryChannelMembers
Get members from teams.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | ConversationMember | Yes | The member to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelMemberQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
headers | DeletePrimaryChannelMemberHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
conversationMemberId | string | Yes | The unique identifier of conversationMember |
payload | ConversationMember | Yes | The member properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | AddMembersRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelMessagesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | ChatMessage | Yes | The message to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelMessageQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | DeletePrimaryChannelMessageHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ChatMessage | Yes | The message properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check teamsClient->setReactionPrimaryChannelMessage("<team-id>", "<chat-message-id>", {reactionType: "👍"});
softDeletePrimaryChannelMessage
Invoke action softDelete.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check teamsClient->softDeletePrimaryChannelMessage("<team-id>", "<chat-message-id>");
undoSoftDeletePrimaryChannelMessage
Invoke action undoSoftDelete.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelMessagesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelMessagesDeltaQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | ReplyWithQuoteRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelMessageHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ChatMessageHostedContent | Yes | The hosted content to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelMessageHostedContentQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeletePrimaryChannelMessageHostedContentHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | ChatMessageHostedContent | Yes | The hosted content properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | byte[] | Yes | New media content |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeletePrimaryChannelMessageHostedContentValueHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelMessageHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelMessageRepliesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ChatMessage | Yes | The message to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelMessageReplyQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | DeletePrimaryChannelMessageReplyHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | ChatMessage | Yes | The message properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | SetReactionRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelMessageRepliesQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelMessageRepliesDeltaQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
payload | ReplyWithQuoteRequest | Yes | Action parameters |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelMessageReplyHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
payload | ChatMessageHostedContent | Yes | The hosted content to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelMessageReplyHostedContentQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeletePrimaryChannelMessageReplyHostedContentHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | ChatMessageHostedContent | Yes | The hosted content properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
payload | byte[] | Yes | New media content |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
chatMessageHostedContentId | string | Yes | The unique identifier of chatMessageHostedContent |
headers | DeletePrimaryChannelMessageReplyHostedContentValueHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
chatMessageId | string | Yes | The unique identifier of chatMessage |
chatMessageId1 | string | Yes | The unique identifier of chatMessage |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelMessageReplyHostedContentsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPrimaryChannelTabsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | TeamsTab | Yes | The tab to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamsTabId | string | Yes | The unique identifier of teamsTab |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelTabQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamsTabId | string | Yes | The unique identifier of teamsTab |
headers | DeletePrimaryChannelTabHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamsTabId | string | Yes | The unique identifier of teamsTab |
payload | TeamsTab | Yes | The tab properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamsTabId | string | Yes | The unique identifier of teamsTab |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPrimaryChannelTabTeamsAppQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountPrimaryChannelTabsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListTagsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
payload | TeamworkTag | Yes | The tag to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetTagQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
headers | DeleteTagHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
payload | TeamworkTag | Yes | The tag properties to update |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountTagsQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListTagMembersQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
payload | TeamworkTagMember | Yes | The tag member to create |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
teamworkTagMemberId | string | Yes | The unique identifier of teamworkTagMember |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetTagMemberQueries | No | Queries 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
teamworkTagMemberId | string | Yes | The unique identifier of teamworkTagMember |
headers | DeleteTagMemberHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | The unique identifier of team |
teamworkTagId | string | Yes | The unique identifier of teamworkTag |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CountTagMembersQueries | No | Queries to be sent with the request |
Returns: string|error
Sample code:
string result = check teamsClient->countTagMembers("<team-id>", "<teamwork-tag-id>");
Sample response:
"<value>"