How to access shared sharepoint files from ms teams bot activity context

Viewed 25

I want to process a file "sent" via ms teams in a personal chat with an ms teams bot app. However only uploaded files appear in the activity not "linked" files from a sharepoint folder shared with onedrive.

  1. click the attachment icon, select onedrive, select a file from a shared folder to be linked: https://i.stack.imgur.com/iDGc4.png

https://i.stack.imgur.com/HW5xT.png

  1. bot receives an activity with the following attachments: context.activity.attachments has the value
[{contentType: 'text/html', content: '<p>test </p>'}]

How can I know which link the user has sent? Is there maybe another event I can listen to to know which file the user linked?

When I upload a new file instead of using one from the shared sharepoint folder then each context.activity.attachments contains a content.downloadUrl from which I can download the file just fine.

0 Answers
Related