Finding all Network Interfaces that are connected to Virtual Machines in Azure
Recently I was involved in a discovery project to find all our network interfaces and virtual machines in Azure. I was aware that you could go to the Network Interface dashboard or the Virtual Machine dashboard but this was too manual for my liking. Also I needed to know which Network Interface was used by which Virtual Machine. So my solution was using Azure Resource Graph Explorer. The following KQL is used to get all Network Interfaces in your azure tenant. resources | where type =~ 'microsoft.network/networkinterfaces' | extend privateIp = properties.ipConfigurations[0].properties.privateIPAddress | extend id = name | project name, privateIp, properties.macAddress, id Running this KQL gives me a output like this in my test tenant. To get the Virtual Machines that use the Network Interfaces a left outer join can be used to join the networkinterfaces table with the virtalmachines table using the IDs. This is the KQL I used the left outer join. | join kind=lefto...