Hello @MS Techie ,
Below is the final query which will also display Management Group Name
resources | where type == "microsoft.compute/disks"
|extend properties=parse_json(properties), DiskName=name
| extend encryptiondisktype=properties.encryption.type , DiskName=name,VMName = split(managedBy,"/")[8]
| join kind=leftouter
(
ResourceContainers
| where type =~ 'microsoft.resources/subscriptions'
| extend properties=parse_json(properties)
| project SubName=properties.managementGroupAncestorsChain[0].displayName , subscriptionId, managementgroupname = properties.managementGroupAncestorsChain[0].displayName
| project SubName, subscriptionId,managementgroupname
)
on $left.subscriptionId == $right.subscriptionId
| project DiskName ,VMName, SubName,subscriptionId,encryptiondisktype,managementgroupname
Let us know if you need additional help.
Regards,
Shiva.