Search code examples
c#botframeworkmicrosoft-teams

Is there a way to detect whether a user is typing from teams mobile app or desktop app?


I am developing a bot which can send files to user. Users ask for reports with report name, and bot generates the file and sends it. This is working like expected within Microsoft Teams desktop app and web app. And Microsoft Teams mobile app does not support to receive files.

If there is a way to detect the application that user is typing to bot, i want to inform users when they ask a file from bot with mobile app, like "use desktop or web app, file transfer is not supported on mobile app".

Is there a way to detect the application that Microsft Teams user is using to type to bot?


Solution

  • Yes, you could get the platform from which the message was sent. Could you please check activity.Entity. Please find the screenshots below:

    Desktop: enter image description here

    Mobile: enter image description here