I'm facing a weird behaviour (bug?) using the PowerShell command "Search-AzGraph".
When I use "Azure Resource Graph Explorer", I don't get this issue.
resourcecontainers
| where type =~ 'microsoft.resources/subscriptions/resourcegroups'
| join kind=leftouter (resources | project ResourceId=id, ResourceName=name, ResourceType=type, resourceGroup) on resourceGroup
(You can copy paste this KQL query directly on your Azure Resource Graph Explorer, it's to display all Azure resources with their Azure respective subscriptionId
With "Azure Resource Graph Explorer", after the "project" keyword to display the columns that I look for, I set "ResourceId" to display the Id of the resource. It works fine. I can see on the result that the column name changed.
But when using "Search-AzGraph", "ResourceId" values contain the value id from "resourcecontainers" instead of "resources". If I remove the "ResourceId=", I got the same (correct) result as "Azure Resource Graph Explorer" but to access to it, I need to use the property "id1". It's not a big deal but I wish to be able to use my own naming column.
Anyone got this experience or I miss something to get the result result on both cases? Thanks