Forum Discussion
Sai06
Sep 08, 2022Copper Contributor
Send chat message with attachment in teams channel
Trying to post chat message with attachment in teams channel using graph API. We are able to post the message successfully but when try to preview the attachment we are seeing a message please find the screenshot below. Please suggest a way to resolve this issue.
tried request to post using graph call:
POST https://graph.microsoft.com/v1.0/teams/{teamsId}/channels/{channelId}/messages
{
"body": {
"contentType": "html",
"content": "Test with Graph Attachment. <attachment id=\"{eTag}\"></attachment>"
},
"attachments": [
{
"id": "{eTag}",
"contentType": "reference",
"contentUrl": "{SPO Attachment URL}",
"name": "Test Versions.docx"
}
]
}
- Nivedipa-MSFTMicrosoftSai06 - We are investigating your query. We will update you soon.
- Sai06Copper ContributorHi Team,
Any update on chat attachment issue?- Nivedipa-MSFTMicrosoftSai06 - Have you used correct contentURL? Can you please hit that contentURL in browser and check the file is opening or not?