Azure Resource Graph - How to query function apps?

%3CLINGO-SUB%20id%3D%22lingo-sub-2777355%22%20slang%3D%22en-US%22%3EAzure%20Resource%20Graph%20-%20How%20to%20query%20function%20apps%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2777355%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20get%20a%20list%20of%20all%20function%20apps%20and%20their%20triggers%20from%20the%20resource%20graph%2C%20but%20I'm%20not%20getting%20anywhere.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20portal%2C%20the%20JSON%20for%20a%20function%20app%20shows%20the%20type%20as%26nbsp%3B%3CSPAN%3E%22Microsoft.Web%2Fsites%2Ffunctions%22%2C%20but%20when%20writing%20a%20resource%20graph%20query%20to%20return%20all%20resources%20of%20that%20type%2C%20I%20get%20no%20results.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E(and%20yes%2C%20I've%20checked%20for%20typos%20in%20my%20query)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAre%20functions%20just%20not%20exposed%20by%20the%20resource%20graph%3F%20Or%20is%20there%20a%20different%20way%20to%20query%20for%20them%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2777355%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Resource%20Graph%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

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?

3 Replies

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

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

Thanks for that. Strangely enough, the portal isn't showing the type for functions as '*/sites/functions' any more.