Unfortunately, there is not a built-in tool or script that will provide a list of all SharePoint Online site collections with active connections to Power Automate or PowerApps to my knowledge.
However, there are a couple of methods:
1. PowerShell Script:
You can use PowerShell scripts with cmdlets like `Connect-SPOService`, `Get-SPOSite` and `Get-PnPFlow` to loop through all your SharePoint Online sites and list flows associated with them. This, however, would require substantial scripting knowledge and does not guarantee a perfect result as you would still need to manually analyze if the flow connects the two services.
2. Power Platform Admin center:
Navigate to the Power Platform Admin center (https://admin.powerplatform.microsoft.com/). Here, you can view all environments, and by drilling down into each environment, you can view all the PowerApps and Flows inside it. You can also see the connections and analyze if SharePoint connections exist. This requires manual effort and might not be feasible for a large number of environments.
3. Audit Log Search:
If your organization has the necessary Office 365 licenses (E5 or Audit Log add-on), you can use Audit Log Search in the Security & Compliance center. Here, you can search for specific activities related to Power Automate, PowerApps, and SharePoint. To find this, go to the Security & Compliance center and then to Search > Audit log search. Choose the necessary activities (like "Flow Run Success") and the date range, and then search. You can Export the results and then analyze them. This approach might not give you a clear cut, but it can provide an idea of which SharePoint sites are commonly used in the context of Power Automate and PowerApps.
Remember, these are all workaround methods as there is currently no direct method to fetch a list of all SharePoint online site collections with active connections to Power Automate or PowerApps.