Unlocking Insights from Azure Activity Logs with Power BI
Published Jun 21 2023 02:31 AM 6,277 Views



In today's data-driven world, the ability to monitor, analyze, and leverage insights from cloud activity is paramount to the success of any organization. Specifically, for those utilizing Microsoft Azure, the challenge often lies in navigating the vast sea of data generated by the multitude of activities happening within Azure environments.


Traditionally, one might resort to using APIs to track Azure usage, which, while effective, could be both time-consuming and technically demanding, especially for larger infrastructures. An alternate approach, that harnesses the capabilities of business intelligence tools, can simplify this process, providing a seamless, efficient, and insightful exploration of Azure Activity Logs.

In this article, we are going to delve into how Power BI, a powerful data visualization and business intelligence tool, can be used to query and analyze Azure Activity Logs. Born out of a request to utilize APIs for Azure usage tracking, we have sought to develop a more streamlined and accessible solution. This innovative approach leverages Power BI’s prowess to transform complex log data into meaningful, actionable insights.


Whether you're an IT professional seeking to troubleshoot issues, a business leader looking to make data-driven decisions, or a data enthusiast eager to explore the depths of Azure Activity Logs, this guide will lead you on a journey from raw data to refined intelligence. Let's uncover the potential of Azure Activity Logs with Power BI.


The Dashboard (Ugly but valuable)






1. Download the PBIT file from my GitHub Repository






2. Open the file in Power BI Desktop and enter your SubscriptionID




3. For now, we will have to manually edit the date and time in the Query. You can do this by opening the data source settings and clicking Advanced Editor






4. You should see something like below. 




5. Let's edit the first line. We can modify the "eventTimestamp ge <StartDate>" and "eventTimestamp le <EndDate>" to a maximum of 90 days from Today (being the present day).


url = "https://management.azure.com/subscriptions/" & SubscriptionIDPar & "/providers/Microsoft.Insights/eventtypes/management/values?api-version=2015-04-01&$filter=eventTimestamp ge '2023-06-01T01:00:00Z' and eventTimestamp le '2023-06-07T01:00:00Z'",


6. After that small modification I can click done. 




7. Then I click close and apply. Now I can refresh and see my current data. 






Who knew that transforming complex Azure Activity Logs into insightful narratives could be so straightforward? With the fusion of Power BI and Azure REST APIs, we've discovered a seamless way to traverse the labyrinth of log data and extract actionable insights.


Using Power BI to query Azure REST APIs has revolutionized how we approach Azure usage tracking. Gone are the days of wading through lines of code or daunting logs. Instead, we're now able to visualize our data in a manner that is both accessible and efficient, delivering a nuanced understanding of our Azure environments at a glance.



The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts or Power BI Dashboards are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts or Power BI Dashboards be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.

Version history
Last update:
‎Jun 08 2023 08:10 AM
Updated by: