title: Get Azure resources associated with a subnet through Azure Resource Graph Query
body: <p>I am looking to fetch all resources associated with a subnet. I could find references oh how to do it the other way around (fetch a particular resource and it includes the subnet it is associated with), but can't find any documents where we can fetch all resources linked with a subnet.</p>
  <p>My ultimate goal is to fetch all azure resources which use a particular network security group. That led me to the above question.</p>
  <p>From another question I understand I can use a REST Api to get details for a specific virtual network. <a href="https://stackoverflow.com/questions/66261092/how-to-check-is-subnet-allocated-with-another-resource-in-azure-using-fluent-api">How to check is subnet allocated with another resource in azure using Fluent API or management API?</a>. I would appreciate if someone could suggest anyway to achieve this.</p>
  <p>Thanks in advance.</p>