Resource Graph Explorer - KQL queries for Azure APP services - get properties

Ieuan Walker 30 Reputation points
2024-01-10T10:02:47.6733333+00:00

Hi,

I am trying to get a list of all the web apps and their .net version

User's image

This is the query I've written, but not getting anywhere with it -

resources
| where ['type'] contains "Microsoft.Web/sites" and kind == "app" 
| project netFrameworkVersion = (properties).config.netFrameworkVersion


resources
| where type =~ 'Microsoft.Web/sites'
| join kind = inner (appserviceresources) on name
| project properties.netFrameworkVersion
Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
577 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,951 questions
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Divakarkumar-3696 375 Reputation points
    2024-01-10T10:36:07.2+00:00

    Hi ,

    appserviceresources is the resource type you should use for this need in Azure Resource Graph Explorer. For more details on supported table resources check here : https://learn.microsoft.com/en-us/azure/governance/resource-graph/reference/supported-tables-resources.

    You could try below query to fetch all web apps on a specific .NET framework version

    appserviceresources
    | where type == "microsoft.web/sites/config"
    | extend dotNetVersion = tostring(properties.NetFrameworkVersion)
    | where dotNetVersion == "v6.0" //remove this condition to list all webapps
    | project SiteName = name, DotNetVersion = dotNetVersion
    

    User's image

    Please 'Accept as answer' if it helped so that it can help others in the community looking for help on similar topics.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.