Logic App issue - UnsupportedMediaType

%3CLINGO-SUB%20id%3D%22lingo-sub-1281736%22%20slang%3D%22en-US%22%3ELogic%20App%20issue%20-%20UnsupportedMediaType%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1281736%22%20slang%3D%22en-US%22%3E%3CDIV%3E%3CSPAN%3EHi%20all%2C%20I%20am%20running%20into%20issues%20trying%20to%20use%20%22Alert%20-%20Get%20Accounts%22%20in%20a%20Logic%20App%20triggered%20by%20Recurrence%20and%20then%20%22Run%20Query%20and%20list%20results%22%20that%20grabs%20new%20Sentinel%20incidents%20each%20minute.%26nbsp%3B%20The%20splat%20on%20the%20Logic%20Apps%20run%20failure%20says%20%22UnsupportedMediaType%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22Message%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22The%26nbsp%3Brequest%26nbsp%3Bentity's%26nbsp%3Bmedia%26nbsp%3Btype%26nbsp%3B'text%2Fplain'%26nbsp%3Bis%26nbsp%3Bnot%26nbsp%3Bsupported%26nbsp%3Bfor%26nbsp%3Bthis%26nbsp%3Bresource.%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EAttached%20is%20the%20Logic%20App%20details%20and%20then%20the%20error.%26nbsp%3B%20Anybody%20else%20had%20issues%20with%20this.%26nbsp%3B%20I%20have%20tried%20recreating%20the%20Logic%20App%20from%20scratch%20and%20the%20issue%20remains.%26nbsp%3B%20I%20am%20assuming%20the%20input%20needs%20to%20be%20formatted%3F%26nbsp%3B%20Anybody%20have%20some%20ideas%3F%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EThanks!%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ELance%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3ESOLVED%3A%20For%20some%20reason%20the%20content%20type%20was%20not%20coming%20through%20as%20JSON.%26nbsp%3B%20Just%20had%20to%20cast%20JSON.%26nbsp%3B%20Via%20CodeView%20we%20had%20to%20use%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%22body%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%40json(items('For_each')%3F%5B'Entities'%5D)%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flogic-apps%2Flogic-apps-content-type%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flogic-apps%2Flogic-apps-content-type%3C%2FA%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fpkirch.github.io%2F2017-11%2Flogic-apps-data-type-issues%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpkirch.github.io%2F2017-11%2Flogic-apps-data-type-issues%2F%3C%2FA%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1336277%22%20slang%3D%22en-US%22%3ERe%3A%20Logic%20App%20issue%20-%20UnsupportedMediaType%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1336277%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F578735%22%20target%3D%22_blank%22%3E%40Lance_Peterson%3C%2FA%3E%2C%20glad%20to%20see%20that%20you%20were%20able%20to%20solve%20the%20issue!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional 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'])",
 
 
 
1 Reply

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