Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

M Query/ KQL Query to call Multiple Azure Subscriptions

Hello Everyone,


I am having nearly 10 Azure Subscriptions. I need to call all of those subscriptions and the respective data using APIs or KQL Query (Log Analytics Query, but not Azure Resource Graph). I need to get all of those data in one table and need to show them in Visualization part.



Subscriptipon1 -- API1 -- 10 VMs

Subscription2 -- API2 -- 20VMs

Subscription3 -- API3 -- 30VMs   ---> Total : 60VMs.


I need solution for this, either with M Query or with KQL Query.

Kindly help me on this.





Power BI Mquery


Helper I
Helper I

Hey @Eyelyn9 ,


The solution which you have sent is inappropriate for my requirement. My requirement is as below.

Total Azure Subscriptions: 10.. that means i need to form 10 Azure APIs...

Each subscription is having 10VMs each... and the count is "10 Subscription * 10 VMs each" = 100 VMs count i need to get.

This should be achieved by Power BI M Query method. If it is possible through Looping in Power BI M query, please provide the required reference links.

Kindly suggest or guide me through this Process, so that my requirement will be satisfied.





Community Support
Community Support

Hi @Sudharshan1919 ,


Hope these could help:



Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!