Failure while trying to download an image from a teams message using Microsoft teams graph API connector in Logic Apps

Puneet Jain 20 Reputation points Microsoft Employee
2024-09-30T08:02:12.23+00:00

I am trying to download an image from a teams message using the Send a Microsoft Graph HTTP request action in Microsoft Teams connector in Logic Apps. From a URl of type this:

https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents/{content-id}/$value

With ContentType: image/png

Here is the error I am getting while making the request:

BadRequest
Http request failed as the content was not valid: 'Unable to translate bytes [89] at index 0 from specified code page to Unicode.'.

Can you help suggest how this can be rectified? The graph connector has the necessary permissions for this call, hence I want to utilize the same. Do let me know if there is a workaround.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,141 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,042 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.
3,268 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.