Questions tagged [azure-resource-graph]

The Azure Resource Graph provides the ability to query, explore and analyse the resources that exist within your Azure subscriptions. The Azure Resource Graph Query Language is based on the Kusto query language.

96 questions
1
vote
1 answer

Fetch billing properties of Azure b2c tenant from API

I have been working on b2c from a couple of weeks. I created many resources like applications, users, user flows, policies. I want to know the billing details of this particular tenant. I found this query where I can get charges list within a…
1
vote
2 answers

KQL :: Find Azure SQL Databases where name like "_old"

I'm new to KQL and I'm trying to list all Azure SQL Databases with the word "_old" in their name. My protoquery is this and it works: // Find "_old" Databases Resources | where type =~ 'microsoft.sql/servers/databases' | where * contains "old" |…
Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113
1
vote
0 answers

KQL :: How to Join Resources and AzureActivity

I found a list of KQL queries that are helping me digging into unused resources on Azure. With this query for example I can see a list of Orphaned Disks: Resources | where type has "microsoft.compute/disks" | extend diskState =…
Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113
1
vote
1 answer

azure kql to get OSversion and OSName from VMSS

resources | where type == "microsoft.compute/virtualmachinescalesets" | extend extensions = properties.virtualMachineProfile.extensionProfile.extensions, osName = properties.virtualMachineProfile.storageProfile.osDisk.osName, osVersion =…
raindrop
  • 525
  • 1
  • 9
  • 16
1
vote
1 answer

KQL how able to slice the data in smaller chunks

I have this query but the output returns 106K records, what I need to add to the query do smaller chunks for data extract and export on CSV. Resources | where type == 'microsoft.compute/virtualmachines' | extend JoinID = toupper(id), …
raindrop
  • 525
  • 1
  • 9
  • 16
1
vote
0 answers

Get Scale Set (VMSS) instances info vie Azure Resource Graph

I want to get vm/instance information on instances running under a VMSS using Azure resource-graph. I'm trying to get info similar to what is returned from querying resources | where type =~ 'microsoft.compute/virtualmachines'. i.e the instance…
Matan Lieberman
  • 416
  • 3
  • 9
1
vote
1 answer

Azure Resource Graph Query Private DNS zones - get all DNS records

Has anyone managed to use Azure Resource Graph Query (Search-AzGraph PowerShell) to retrieve ALL DNS Records of every Private DNS Zone? I believe there must be a way of getting DNS records related to object:…
1
vote
1 answer

Azure resource graph query re-write default tag response

I am trying to alter the default response of Azure Resource graph query into similar that Azure portal uses. My query is: resourcecontainers | where type == "microsoft.resources/subscriptions" | project name, tags From where the response for tags…
Kamsiinov
  • 1,315
  • 2
  • 20
  • 50
1
vote
1 answer

KQL for ARG - Checking if any element of array satisfies a predicate

Suppose I have the following input as some table cell value: Addrs [{"ip": "1.1.1.1"},{"ip": "2.2.2.2"},{"ip": "3.3.3.3"},{"ip": "4.4.4.4"}] Is it possible to filter the rows by checking if any of the array values satisfies a…
igorc
  • 2,024
  • 2
  • 17
  • 29
1
vote
1 answer

KQL / Azure Resource Graph Explorer: combine values from multiple records

I am trying to fetch all public ips and fqdns configured for a set of load balancers in azure resource graph explorer. I am getting all the data I need with the following query: Resources | where type =~ 'Microsoft.Network/loadBalancers' | where…
sepp
  • 13
  • 3
1
vote
1 answer

Get the certificate status of all Service Principals, like if the certificate is invalid, in Azure, and eventually what they are connected to in Azure

I have a lot of service principles that have not been maintained as well as they should have. They are used in different pipelines and god only knows what. I am trying to figure out a way to get a list of the invalid service principles. I can get…
1
vote
2 answers

Display number of running Azure VM's on a dashboard

I'd like to create a dashboard in the Azure Portal that displays the number of active virtual machines per resource group. In this case I'm not interested in any deallocated or stopped VM's. Since filtering the virtual machines blade doesn't work…
Herman Cordes
  • 4,628
  • 9
  • 51
  • 87
0
votes
1 answer

Listing all namespaces belonging to specific AKS clusters using Azure Resource Graph

I have 3 AKS Clusters in my Azure, and I need to list all namespaces belonging to each specific AKS cluster using a resource graph query. Is it possible? If so, could you please support me to write this query since I couldn't find a way on the web…
vcb0127
  • 11
  • 1
0
votes
0 answers

Azure resource graph get assigned and deprecated policies

My current query is: policyresources | where type =~ 'microsoft.policyinsights/policystates' | extend policyDefinitionId = tostring(properties.policyDefinitionId), policyAssignmentScope = tostring(properties.policyAssignmentScope), …
Kamsiinov
  • 1,315
  • 2
  • 20
  • 50
0
votes
0 answers

How to extract first level (right under tenant level) management groups on Azure (Resource graph explorer)?

I am currently trying to write queries using Azure Resource graph explorer. I would like to display the compliance and non compliance of resources by management groups. On the tenant, the architecture is similar to the one below. Hierarchy Azure…