Share via

Replace Image files with bot using API in MS Teams chat

Kalinga Somana 25 Reputation points
2023-11-30T08:01:34.9+00:00

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 asyncgw.teams.microsoft.com) and asyncgw.teams.microsoft.com 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 asyncgw.teams.microsoft.com with some API call?

Thanks!

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.