bwwelle's avatar
bwwelle
Copper Contributor
Jun 09, 2023
Status:
New

Retrieving Teams Message In-line Images for Application Level Authenticated Apps

I've written an application embedding Teams into a Vue application with a backend that calls the graph api utilizing application level authentication and able to get most the data needed (not presence, but that's a different issue).  One piece I'm not able to retrieve are the files for the images that are embedded into the messages, commonly refered to as "in-line images".  They are not attachments, they images coppied or inserted into the message.

 

The "src" of these images look like "https://graph.microsoft.com/v1.0/teams/[TEAM ID] /channels/[CHANNEL ID]/messages/[MESSAGE ID]/replies/[REPLY ID]/hostedContents/[LONG GUID]/$value\".

 

Using application level (not delegated level) permissions, how can I get these image files?  And if not available, oh, that should be a feature added.

 

Thanks.

 

1 Comment

  • bwwelle's avatar
    bwwelle
    Copper Contributor

    Well the feature is already built:

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

     

    So all good!