Getting Images/Atachments when user upload an image to Ms-Teams - azure bot

Telestax 1 Reputation point
2022-09-20T10:09:52.92+00:00

When the user is tagging the bot inside the team and sending some text message we get a call on our “Messaging endpoint” and we get all the details about the message

When the user is tagging the bot inside the team and sending some Image attached to the message we get a call on our “Messaging endpoint” , But the message details does not contain any information about the attached image (image url?)

We were expecting to get the URLs of the images that where attached to the message

Attached also the manifest.json file
We change the flag "supportsFiles": to true (but this did not help)

  1. How can we get the files/images urls that were attached to a message in the team chat
  2. Do we need to provide additional permissions to the app? Not so clear which ones
    242898-bot.png
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,145 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.
2,879 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sayali-MSFT 2,266 Reputation points Microsoft Vendor
    2022-09-21T11:21:20.063+00:00

    Files that you upload to a one-on-one or group chat are stored in your OneDrive for Business folder and are shared only with the people in that conversation.

    Files that you upload to a channel are stored in your team's SharePoint folder. These files are available in the Files tab at the top of each channel

    Retrieve a single message or a message reply in a channel or a chat.

    GET https://graph.microsoft.com/v1.0/chats/19:8ea0e38b-efb3-4757-924a-5f94061cf8c2_97f62344-57dc-409c-88ad-c4af14xxxxx@unq.gbl.spaces/messages/161228999xxxx  
    

    Reference Doc-https://learn.microsoft.com/en-us/graph/api/chatmessage-get?view=graph-rest-1.0&tabs=http

    To go from url to accessing and downloading it through Graph, you can use https://learn.microsoft.com/en-us/graph/api/shares-get?view=graph-rest-1.0&tabs=http

    1 person found this answer helpful.
    0 comments No comments