Replace Image files with bot using API in MS Teams chat

Kalinga Somana 25 Reputation points

Hi Everyone,

We are developing an MS Teams bot where we have a use case to replace an Image file with another Image file. We have implemented the scenario using the SharePoint APIs. But there is an issue with it. If we download the file from the SharePoint list of files, we get the replaced file but if we try to download the file from Teams Chat Preview, we can still download the original file, not the replaced one.

I have looked over the network logs, the image file is getting saved in two different endpoints (SharePoint and and is used for previewing and downloading the file from the teams chat.

Is there any way we can point the download URL in MS Teams image preview to the SharePoint image URL or can we replace the file in with some API call?


Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,618 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,436 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,062 questions
{count} votes