I am trying to filter instances based on tags. I am using the below command to list instances that have wknhscale == 'active' tag. It is working fine and returns the instance name and resource group.
az graph query -q "Resources | where type =~ 'Microsoft.Compute/virtualMachines'| where tags['wknhscale']=='active' | project name, resourceGroup"| jq '[.data[] | {name, resourceGroup}]'
Now at the same time, I want to fetch the IP address of the Instance also. So I am using the below query, But it's not giving me any data.
az graph query -q "Resources | where type =~ 'Microsoft.Compute/virtualMachines' type =~ 'Microsoft.Compute/privateIPAddresses'| where tags['wknhscale']=='active'"