
Explanation:

Automation rules in Microsoft Sentinel cannot invoke playbooks that start with the entity trigger; the recommended and supported pattern is to use an incident-triggered playbook because an incident object contains the alerts and the incident's entities. When an automation rule runs a playbook using the When a response to an Microsoft Sentinel incident is triggered (incident trigger), the playbook receives the full incident payload, including the entities array. That incident payload is what allows the logic app to enumerate entities and call the Entities - Get Hosts action for each entity found in the incident.
To ensure the playbook gets the entities and their detailed data needed by the Entities - Get Hosts action, you must configure the automation rule to pass the full incident properties (not just minimal alert fields). In the Run playbook action parameters, choose the option that provides the Alert + Full incident properties (i.e., the full incident object including entities). This guarantees the playbook has the entity objects to feed into the Entities - Get Hosts connector action so it can resolve the hosts related to those entities.
Therefore: use an incident-triggered playbook and pass Alert and FullIncidentProperties so the playbook can call Entities - Get Hosts successfully.