Get az resource details using kql

Himanshuk 161 Reputation points
2021-11-15T14:49:07.277+00:00

I try to get all resource group names using subscription id using kql(kusto query)
But further to reach group I try to find group name, resource is, resource type, how to at it and how to for each in kql else any query ?
I HAVE TRIED INNER JOIN ON REAOURCE GROUP BUT NOT GETTING DETAILS INSIDE IN IT

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
479 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 76,511 Reputation points Microsoft Employee
    2021-11-16T09:41:12.393+00:00

    Hello anonymous user,

    Thanks for the question and using MS Q&A platform.

    You can use the below query to get the Azure Resources details using Kusto Query Language:

    resources  
    | join kind=inner (  
        resourcecontainers  
        | where type == 'microsoft.resources/subscriptions'  
        | project subscriptionId = '<YourSubsciptionID>')  
        on subscriptionId  
    | project resourceGroup, name, type  
    

    149743-image.png

    In case, if you have multiple subscriptions, you can use the below query:

    resources  
    | join kind=inner (  
        resourcecontainers  
        | where type == 'microsoft.resources/subscriptions'  
        | project subscriptionId, subscriptionName = name)  
        on subscriptionId  
    | project subscriptionName, resourceGroup, name, type, tags  
    
     
    

    149706-image.png

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    0 comments No comments

0 additional answers

Sort by: Most helpful