You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GET https://graph.microsoft.com/beta/chats/19:e2ed97baac8e4bffbb91299a38996790@thread.v2/messages/1727903166936
676
+
```
677
+
678
+
#### Response
679
+
680
+
The following example shows the response. The message body contains a forwarded message as an attachment. The **contentType** for the forwarded message is identified as `forwardedMessageReference`. The original message that was forwarded is also available in the attachment **content**.
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET chats('<key>')/messages('<key>')?$select=attachments,body",
Copy file name to clipboardExpand all lines: api-reference/beta/resources/chatmessageattachment.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -15,15 +15,15 @@ Namespace: microsoft.graph
15
15
16
16
Represents an attachment to a chat message entity.
17
17
18
-
An entity of type `chatMessageAttachment` is returned as part of the [Get channel messages](../api/channel-list-messages.md) API, as a part of [chatMessage](chatmessage.md) entity.
18
+
An entity of type **chatMessageAttachment** is returned as part of the [Get channel messages](../api/channel-list-messages.md) API, as a part of [chatMessage](chatmessage.md) entity.
19
19
20
20
## Properties
21
21
| Property | Type |Description|
22
22
|:---------------|:--------|:----------|
23
-
|id|string| Read-only. The unique id of the attachment.|
24
-
|contentType| string | The media type of the content attachment. It can have the following values: <br><ul><li>`reference`: Attachment is a link to another file. Populate the <b>contentURL</b> with the link to the object.</li><li>Any <b>contentType</b> that is supported by the Bot Framework's [Attachment object](/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?#attachment-object).</li><li>`application/vnd.microsoft.card.codesnippet`: A code snippet. </li><li>`application/vnd.microsoft.card.announcement`: An announcement header. </li>|
25
-
|contentUrl|string|The URL for the content of the attachment. |
26
23
|content|string|The content of the attachment. If the attachment is a [rich card](/microsoftteams/platform/task-modules-and-cards/cards/cards-reference), set the property to the rich card object. This property and **contentUrl** are mutually exclusive.|
24
+
|contentType| string | The media type of the content attachment. The possible values are: <br><ul><li>`reference`: The attachment is a link to another file. Populate the <b>contentURL</b> with the link to the object.</li><li>`forwardedMessageReference`: The attachment is a reference to a forwarded message. Populate the <b>content</b> with the original message context.</li><li>Any <b>contentType</b> that is supported by the Bot Framework's [Attachment object](/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?#attachment-object).</li><li>`application/vnd.microsoft.card.codesnippet`: A code snippet. </li><li>`application/vnd.microsoft.card.announcement`: An announcement header. </li>|
25
+
|contentUrl|string|The URL for the content of the attachment. |
26
+
|id|string| Read-only. The unique ID of the attachment.|
27
27
|name|string|Name of the attachment.|
28
28
|teamsAppId| string |The ID of the Teams app that is associated with the attachment. The property is used to attribute a Teams message card to the specified app.|
29
29
|thumbnailUrl| string |The URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of **content** or **contentUrl**. For example, if you set **contentType** to application/word and set **contentUrl** to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user selects the image, the channel would open the document.|
@@ -46,10 +46,10 @@ An entity of type `chatMessageAttachment` is returned as part of the [Get channe
"Description": "Added `forwardedMessageReference` as a supported value for the **contentType** property in the [chatMessageAttachment](https://learn.microsoft.com/en-us/graph/api/resources/chatmessageattachment?view=graph-rest-beta) resource.",
Copy file name to clipboardExpand all lines: concepts/teams-messaging-overview.md
+63-42Lines changed: 63 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -22,47 +22,6 @@ The [chatMessage](/graph/api/resources/chatMessage) resource type represents mes
22
22
23
23
The [chatMessageAttachment](/graph/api/resources/chatmessageattachment) resource type represents entities that can be referenced from a [chatMessage](/graph/api/resources/chatMessage?preserve-view=true). These entities include files, tabs, cards, meetings, or other messages. The items themselves might be located somewhere else. For example, files might be stored in SharePoint. The following sections describe the possible types of attachments on a **chatMessage** object.
24
24
25
-
#### file attachment
26
-
27
-
When an [attachment](/graph/api/resources/chatmessageattachment) object refers to a file, it contains information about the file, including the link to open the file. The file itself is located in an accessible store like SharePoint. When a **chatMessage** has an attachment of type file, the value of the **contentType** property on the [attachment](/graph/api/resources/chatmessageattachment) resource is set to `reference`, and the **contentUrl** property contains the file URL.
28
-
29
-
> **Note:** The SharePoint URL is the link that opens the file; it is not the Microsoft Graph URL. Callers can, however, use the [access shared items](/graph/api/shares-get) API to get the information about the contents of the file.
30
-
31
-
The following example shows the schema for a file attachment.
When an [attachment](/graph/api/resources/chatmessageattachment) object refers to a [tab](/graph/api/resources/teamstab) hosted in the present context, the **contentType** property is set to `tabReference`, the **id** property is set to the ID of the tab, and the **name** property is set to the tab name. This scenario often applies when tabs are newly added.
50
-
51
-
The following example shows the schema for an tab attachment.
Cards represent visual elements backed by a predefined schema. Teams supports the cards defined by the [Bot Framework](/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0&preserve-view=true#attachment-object) in addition to the following card types:
@@ -108,7 +67,49 @@ The following example shows the schema for an adaptive card attachment when the
108
67
]
109
68
```
110
69
111
-
> **Note:** Microsoft Graph only supports cards that have the **OpenUrl** action set. Other actions like **ShowCard** are not supported. Microsoft Graph does allow messages posted by bots that have other actions in them to be read.
70
+
> **Note:** Microsoft Graph only supports cards that have the **OpenUrl** action set. Other actions like **ShowCard** aren't supported. Microsoft Graph does allow messages posted by bots that have other actions in them to be read.
71
+
72
+
#### file attachment
73
+
74
+
When an [attachment](/graph/api/resources/chatmessageattachment) object refers to a file, it contains information about the file, including the link to open the file. The file itself is located in an accessible store like SharePoint. When a **chatMessage** has an attachment of type file, the value of the **contentType** property on the [attachment](/graph/api/resources/chatmessageattachment) resource is set to `reference`, and the **contentUrl** property contains the file URL.
75
+
76
+
> **Note:** The SharePoint URL is the link that opens the file; it isn't the Microsoft Graph URL. Callers can, however, use the [access shared items](/graph/api/shares-get) API to get the information about the contents of the file.
77
+
78
+
The following example shows the schema for a file attachment.
An [attachment](/graph/api/resources/chatmessageattachment) object contains a forwarded message that was forwarded to a [chat](/graph/api/resources/chat). For message attachments, the **id** property contains the ID of the forwarded message. The **content** property contains more details about the message; for example, the original message context and original sender detail. For message attachments, the **contentType** property is set to `forwardedMessageReference`.
97
+
98
+
The following example shows the schema for a forwarded message attachment.
@@ -147,6 +148,26 @@ The following example shows the schema for a message attachment.
147
148
],
148
149
```
149
150
151
+
#### tab attachment
152
+
153
+
When an [attachment](/graph/api/resources/chatmessageattachment) object refers to a [tab](/graph/api/resources/teamstab) hosted in the present context, the **contentType** property is set to `tabReference`, the **id** property is set to the ID of the tab, and the **name** property is set to the tab name. This scenario often applies when tabs are newly added.
154
+
155
+
The following example shows the schema for an tab attachment.
The **body** property of a **chatMessage** object represents the body of the message. The **body** property can refer to other elements in the schema such as mentions or attachments. The contents can be `text` or `html`, as specified by the **contentType** property of the [itemBody](/graph/api/resources/itembody) resource type.
Copy file name to clipboardExpand all lines: concepts/whats-new-overview.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,7 @@ The Microsoft Entra Health monitoring alerts APIs enable you to detect anomalous
103
103
### Teamwork and communications | Messaging
104
104
105
105
- Updated the [chatMessage: delta](/graph/api/chatmessage-delta?view=graph-rest-beta&preserve-view=true) method to use a new endpoint that gets the list of delta messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats.
106
+
-[Get](/graph/api/chatmessage-get?view=graph-rest-beta&preserve-view=true#example-6-get-a-chat-message-with-a-forwarded-message) a chat message that has a forwarded message as an attachment.
106
107
-[Remove multiple members](/graph/api/conversationmember-remove?view=graph-rest-beta&preserve-view=true) from a [team](/graph/api/resources/team?view=graph-rest-beta&preserve-view=true) in a single request.
0 commit comments