Forum Discussion
Lance_Peterson
Apr 04, 2020Copper Contributor
Logic App issue - UnsupportedMediaType
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'])",
- jasonchristCopper ContributorThanks Lance, I encountered this error, and your solution solved the issue.
- Valon_Kolica
Microsoft
Hi Lance_Peterson, glad to see that you were able to solve the issue!