Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community

Logic App issue - UnsupportedMediaType

Copper Contributor
Hi all, I am running into issues trying to use "Alert - Get Accounts" in a Logic App triggered by Recurrence and then "Run Query and list results" that grabs new Sentinel incidents each minute.  The splat on the Logic Apps run failure says "UnsupportedMediaType"
 
{
  "Message""The request entity's media type 'text/plain' is not supported for this resource."
}
 
Attached is the Logic App details and then the error.  Anybody else had issues with this.  I have tried recreating the Logic App from scratch and the issue remains.  I am assuming the input needs to be formatted?  Anybody have some ideas?
 
Thanks!
Lance
 
SOLVED: For some reason the content type was not coming through as JSON.  Just had to cast JSON.  Via CodeView we had to use 
"body""@json(items('For_each')?['Entities'])",
 
 
 
2 Replies

Hi @Lance_Peterson, glad to see that you were able to solve the issue! 

Thanks Lance, I encountered this error, and your solution solved the issue.