Forum Discussion

rbanks-w's avatar
rbanks-w
Copper Contributor
Sep 23, 2021

Azure Resource Graph - How to query function apps?

I'm trying to get a list of all function apps and their triggers from the resource graph, but I'm not getting anywhere.

 

In the portal, the JSON for a function app shows the type as "Microsoft.Web/sites/functions", but when writing a resource graph query to return all resources of that type, I get no results. (and yes, I've checked for typos in my query)

 

Are functions just not exposed by the resource graph? Or is there a different way to query for them?

  • BrooksV's avatar
    BrooksV
    Copper Contributor

    resources | where type =~ "microsoft.web/sites" and kind has "functionapp"

    • rbanks-w's avatar
      rbanks-w
      Copper Contributor
      Thanks for that. Strangely enough, the portal isn't showing the type for functions as '*/sites/functions' any more.
    • BrooksV's avatar
      BrooksV
      Copper Contributor

      resources
      | where type =~ "microsoft.web/sites"
      | summarize count() by kind

Resources