SendMessage
Send message to Microsoft Teams.
Task version: 1.1.0
Required Frends version: 5.5+
Required .NET version: 6.0
Compatible Agents: Crossplatform
Task Parameters
🗝Token : String
Bearer token.
Default: -
Example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Imk2bEdrM0ZaenhSY1ViMkMzbkVRN3N5SEpsWSJ9...
ChannelId : String
Channel ID.
Default: -
Example: 20%3au0yPT4vDedASF0InQKu233CiYHqdAtFnXA_45UB6Zgo1%40thread.tacv2
TeamId : String
Team ID.
Default: -
Example: 19%3au0yPT4vDedPFASD3QKu233CiZwqdAtFnXA_25UB6Zgo1%40thread.tacv2
Subject : String
The subject of the chat message, in plaintext.
Can be empty.
Default: -
Example: This is subject
BodyType : BodyTypes
The type of the content.
Possible values:
text: The type of the content.html: The type of the content.
Default: 1
Example: BodyTypes.html
MessageContent : String
Message content.
Default: -
Example: This is a plain message, This is html message to <at id="0">Jane Smith>/at<
SetMentions : Boolean
Set entities mentioned in the chat message.
Default: False
Example: true
MentionParameters : MentionParameters[]
List of entities mentioned in the chat message.
Supported entities are: user, bot, team, and channel.
Default: -
Example: { [ 0, MentionText, UserDisplayName, ef1c916a-3135-4417-ba27-8eb7bd084193, [ foo, bar ], [ 1, MentionText2, UserDisplayName2, ef1c916a-3135-4417-ba27-8eb7bd084194, [ bar, foo ] }
SetAttachments : Boolean
Set references to attached objects like files, tabs, meetings.
Note: The file must already be in SharePoint. See https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=csharp
Default: False
Example: true
AttachmentParameters : AttachmentParameters[]
References to attached objects like files, tabs, meetings.
Default: -
Example: { [ 1, reference, https://m365x987948.sharepoint.com/sites/test/Shared%20Documents/General/foo.docx, foo ], [ reference, https://m365x987948.sharepoint.com/sites/test/Shared%20Documents/General/bar.docx, bar ], }
ThrowOnError : Boolean
Throw an error on exception.
If set to false, exception message can be found in Result.ErrorMessage.
Default: -
Example: true
Task Result
Success : Boolean
Operation complete without errors.
Example: true
ErrorMessage : String
Error message.
Example: An error occured...
Task Changelog
Changelog for Task Frends.MicrosoftTeams.SendMessage.
[1.1.0] - 2025-02-17
Added
Update: Microsoft.Graph 5.24.0 -> 5.73.0 MSTest.TestAdapter 3.8.0 -> 3.8.3 MSTest.TestFramework 3.8.0 -> 3.8.3
[1.0.0] - 2023-11-17
Added
Initial implementation
Last updated
Was this helpful?

