Logic Apps - Issue Passing Entity from Sentinel Connector to PowerShell Runbook Parameter


Hi All,


I previously created some basic Logic Apps that would generate whenever an Azure Monitor (Log Analytics) alert was triggered and would then take the host name and IP address (depending on the use cases it was one or both) and pass those values generated from the alert into a "Create Job" event for Automation Account Logic Apps connector. 


I want to move these playbooks into Sentinel leveraging the Sentinel Connector to get the data generated from the alert, grab the specific entities (in the case a HostName, IP or combination of both) and then pass those entities into the runbook parameters. I set up the Logic App as such, however, I'm running into an error (attached screenshot) stating the input value was not a JSON object. Is there something I am missing from the Sentinel connector generating the results and passing that entity on? Does it need to be converted into a JSON object after getting the entities, and if so, how would I go about doing that?




10 Replies

@SH30 It may be that you need to load the Incident between the trigger and the Get hosts alert and use the Entites from the Incident

Thanks @Gary Bushey, will try that out and let you know the results.

@Gary Bushey Thanks again for the suggestion, unfortunately it's still running into the same issue.

@SH30 I had a response come back that was throwing a JSON Formatting error and it went away when I completely rebuilt my workbook from scratch.  Not sure if that is how you built this one or not.  Hope it helps.

@Gary Bushey Thanks for the heads up there as well. Went and re-created the entire flow and still hitting those same errors, at this point not entirely sure what the issue is.


Thanks again.

@SH30 The only other thing I can suggest is writing out the values into a Team message to see if there is something wrong with it.


@Gary Bushey @SH30  There have been an error in a backend issue where entities weren't listed in the incidents making the log apps using entities not working. This was solved sometime early half of december. Now the entities shows up in incidents but I'm still getting errors with my logic apps using entities, not quite the same ones though. 


I'm looking for accounts as entities and using "Alert - Get Accounts (Preview) and listing the entities using the dynamic content just as in "Document preview of Logic App Config 1 of 2.png"

"Message": "The request entity's media type 'text/plain' is not supported for this resource.\r\nclientRequestId: 6979...."
Seems like the same issue or am I missing something?

@OskarEnfo I have not run into this issue before.  There may be some issue with how your Entity was stored before the bug was fixed.  You will probably need to open a ticket with MS to get this resolved.


I have a Playbook that I run that looks at all the Entities and it works just fine

@OskarEnfo I modified my Playbook to do what you were doing and it ran fine without any errors. 

Building a new workbook from scratch worked. It's identical but gives a different result..or was, I added stuff once it worked.