microsoft / BotFramework-Services

Microsoft Bot Framework Services
Creative Commons Attribution 4.0 International
38 stars 11 forks source link

Teams Back end Change of May 10, 2024 breaks screenshot sharing with Teams Apps/Bots - URL format has changed and no access to Bots #362

Open GauravES opened 3 months ago

GauravES commented 3 months ago

Microsoft appears to have rolled out a Teams Back end Change on May 10, 2024 which breaks screenshot sharing to Teams Apps/Bots. We noticed a URL format change and the resulting URL provides no access to Bots.

When an end user on Teams pastes a screenshot to a Teams App (Bot) in a one-one chat (Personal Scope), Teams stores the screenshot as an image on smba.trafficmanager.net and send the URL to location to the Bot. The bot can then use its authentication/bearer token and downloads the screen shot.

This has worked fine for 3+ years but a change rolled out on Fri May 10, 2024 first in Europe and then in Americas has broken bot access to the URL that points to the smba.trafficmanager.net location that stores the image.

Our devs analyzed the change and found that a tenantid is now inserted in the URL and the resulting URL no longer provides access to the bot to download the screenshot. See snippet below (Error provided is API isnt enabled for the bot, and presents as a HTTP 405 error

IYAB8gxW

Note that if we strip out the tenantid from the new URL to match the old format, our bots are able to download the screenshot. We have had to make an emergency workaround using regex to strip out the tenantid while we (and hopefully Microsoft) investigate this further.

The bot is built using Microsoft Bot Framework and is a multi-tenant bot. Bot is deployed in the end user tenant using a manifest by the Teams Admin and part of a Global Permission Policy. Additionally, it is not just one bot or tenant facing this issue. We see this across multiple bot and multiple tenants with different instances of our application

This does not seem to affect 1-1 chats between end users - just between user and Teams App/Bot. Also attachments shared via paperclip have a sharepoint URL and they are not impacted - just the cut and paste screenshots.

(Approach to download copy/paste images is same as one describe here https://github.com/MicrosoftDocs/msteams-docs/issues/1561#issuecomment-615186022 and this has worked fine for many years till the change of May 10, 2024

GauravES commented 3 months ago

Microsoft has acknowledged the bug

image