Skip to main content

Notifications

Power Platform Community / Forums / Using Connectors / Getting hostedContents...
Using Connectors
Unanswered

Getting hostedContents value from Teams channel message using Graph API

Posted on by 282
Hello community,
 
I am trying to get the contents (images) of a Teams channel message in Power Apps / Power Automate. I have been following the documentation provided here: https://learn.microsoft.com/en-us/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0&tabs=http
 
Using the Graph Explorer to get the hosted contents works fine:



I am using the Teams HTTP connector in Power Automate. When I enter the same URL in there with the Content-Type as image/png (which is the actual content type), I get this error:

 
Everything works fine in Power Automate until I use the /$value parameter. What could be the mistake here and how do I fix it?

Error: Http request failed as the content was not valid: 'Unable to translate bytes [89] at index 0 from specified code page to Unicode.'.
Categories:
  • Expiscornovus Profile Picture
    Expiscornovus 29,911 on at
    Getting hostedContents value from Teams channel message using Graph API
    Have you tried the application/json Content-Type header instead in your Teams action to see if it returns the contentbytes and content type? 

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,745

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard

Featured topics