PRADEEP THILANKA WARAGODA Thanks for patiently waiting on this.
Update for the community:
To pull all V1 actions in a subscription, use the below query in Azure Resource Graph Explorer (similar discussion) which will list the resource group, logic app name, action count etc.
resources
| where subscriptionId == "<subscription-id>"
| where type == "microsoft.logic/workflows"
| extend propertiesJson=parse_json(properties)
| extend actionsJson=propertiesJson["definition"]["actions"]
| mv-expand actionsJson
| where notnull(actionsJson)
| extend path=extract("\"path\":\"(.*?)\"", 1, tostring(actionsJson))
| where notnull(path) and path startswith "/datasets/default/"
| extend actionConnectionName=extract("\"connection\":{\"name\":\"(.*?)\"}", 1, tostring(actionsJson))
| where notnull(actionConnectionName)
| parse actionConnectionName with "@parameters('$connections')['"parsedActionConnectionName"']['connectionId']"
| extend tmpConnection = propertiesJson["parameters"]["$connections"]["value"][parsedActionConnectionName]
| where notnull(tmpConnection)
| extend connectionId=extract("\"id\":\"(.*?)\"", 1, tostring(tmpConnection))
| where notnull(connectionId) and connectionId endswith "/managedApis/sql"
| project id, name, resourceGroup, actionsJson
| summarize v1ActionCount = count() by resourceGroup, logicAppName = name
For V1 triggers:
resources
| where subscriptionId == "<subscription-id>"
| where type == "microsoft.logic/workflows"
| extend propertiesJson=parse_json(properties)
| extend triggersJson=propertiesJson["definition"]["triggers"]
| mv-expand triggersJson
| where notnull(triggersJson)
| extend path=extract("\"path\":\"(.*?)\"", 1, tostring(triggersJson))
| where notnull(path) and path startswith "/datasets/default/"
| extend triggerConnectionName=extract("\"connection\":{\"name\":\"(.*?)\"}", 1, tostring(triggersJson))
| where notnull(triggerConnectionName)
| parse triggerConnectionName with "@parameters('$connections')['"parsedTriggerConnectionName"']['connectionId']"
| extend tmpConnection = propertiesJson["parameters"]["$connections"]["value"][parsedTriggerConnectionName]
| where notnull(tmpConnection)
| extend connectionId=extract("\"id\":\"(.*?)\"", 1, tostring(tmpConnection))
| where notnull(connectionId) and connectionId endswith "/managedApis/sql"
| project id, name, resourceGroup, triggersJson
| summarize v1TriggerCount = count() by resourceGroup, logicAppName = name
You can modify the query based on your scenario. Our product team is actively working on to update the info in https://learn.microsoft.com/en-us/connectors/sql doc.
I hope this helps and sorry for the inconvenience caused. Please let me know if any questions.
If you found the answer to your question helpful, please take a moment to mark it as Yes
for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.