New-MgBetaTeamChannelMessage
New-MgBetaTeamChannelMessage
New-MgBetaTeamChannelMessage
Reference
Module:
Microsoft.Graph.Beta.Teams
Send a new chatMessage in the specified channel or a chat.
Note
To view the v1.0 release of this cmdlet, view New-MgTeamChannelMessage
Syntax
Description
Send a new chatMessage in the specified channel or a chat.
Permissions
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
ChannelMessage.Send, Group.ReadWrite.All,
Delegated (personal Microsoft account)
Not supported
Application
Teamwork.Migrate.All,
Examples
Example 1: Send a Hello World message in a channel
This example will send a hello world message in a channel
Example 2: @mentions a user in a channel message
This example @mentions a user in a channel message
Example 3: Send message that contains cards
This example will send message that contains cards
Example 4: Send a message with file attachment in it
This example will send a message with file attachment in it
Example 5: Send a card with inline images
This example will send a card with inline images
Example 6: @mention a channel in a channel message
This example will @mention a channel in a channel message
Example 7: @mention a team in a channel message
This example will @mention a team in a channel message
Example 8: @mention a tag in a channel message
This example will @mention a tag in a channel message
Example 9: Send message that contains cards that are attributed to a Teams app
This example will send message that contains cards that are attributed to a teams app
Example 10: Send a message that contains an announcement
This example will send a message that contains an announcement
PARAMETERS
-AdditionalProperties
Additional Parameters
-Attachments
References to attached objects like files, tabs, meetings etc.
To construct, see NOTES section for ATTACHMENTS properties and create a hash table.
-Body
itemBody
To construct, see NOTES section for BODY properties and create a hash table.
-BodyParameter
chatMessage
To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
-ChannelId
The unique identifier of channel
-ChannelIdentity
channelIdentity
To construct, see NOTES section for CHANNELIDENTITY properties and create a hash table.
-ChatId
If the message was sent in a chat, represents the identity of the chat.
-CreatedDateTime
Timestamp of when the chat message was created.
-DeletedDateTime
Read only.
Timestamp at which the chat message was deleted, or null if not deleted.
-Etag
Read-only.
Version number of the chat message.
-EventDetail
eventMessageDetail
-From
chatMessageFromIdentitySet
-Headers
Optional headers that will be added to the request.
-HostedContents
Content in a message hosted by Microsoft Teams - for example, images or code snippets.
To construct, see NOTES section for HOSTEDCONTENTS properties and create a hash table.
-Id
The unique identifier for an entity.
Read-only.
-Importance
chatMessageImportance
-InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
-LastEditedDateTime
Read only.
Timestamp when edits to the chat message were made.
Triggers an 'Edited' flag in the Teams UI.
If no edits are made the value is null.
-LastModifiedDateTime
Read only.
Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed.
-Locale
Locale of the chat message set by the client.
Always set to en-us.
-Mentions
List of entities mentioned in the chat message.
Supported entities are: user, bot, team, channel, chat, and tag.
To construct, see NOTES section for MENTIONS properties and create a hash table.
-MessageHistory
List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message.
To construct, see NOTES section for MESSAGEHISTORY properties and create a hash table.
-MessageType
chatMessageType