When I saw this post on Twitter, I immediately wanted to take the challenge 🙂
OMG Just been asked to write a query to pull all the URL's of our logic app endpoints inbound and outbound #LogicAppsAviators
— MarkBrimble (@BrimbleMark) February 22, 2023
To try to solve this challenge, I wanted to use Azure Resource Graph, because this easily allows you to query all your Azure resources at scale. After a little investigation, I discovered that the complete Logic Apps definition is also available. I was not able to solve it completely (yet), but I wanted to share already a good starting point.
Get all inbound HTTP endpoints for Logic Apps Consumption
This query gives you all the URLs of Logic Apps that are starting with the HTTP Request trigger:
resources | where type == 'microsoft.logic/workflows' | mv-expand bagexpansion=array trigger = properties.definition.triggers | where trigger[1].type == "Request" and trigger[1].kind == "Http" | project name, inbound_url = properties.accessEndpoint
Conclusion
Azure Resource Graph is a really nice way to discover what is running in your Azure environment. This query is only a starting point. Depending on my energy level, I hope to find the time to continue to expand this query for Logic Apps Standard.
Cheers
Toon