Forum Discussion

AndrewPrabhakar's avatar
AndrewPrabhakar
Frequent Visitor
4 months ago
Solved

Unable to load Azure log analytics data completely to Power BI

Hello All,   We are tracking logs in Azure Log analytics. The same needs to be consumed in Power BI for Visualizations. As of now we have a row count of 7 million which will only increase.   The...
  • v-sgandrathi's avatar
    3 months ago

    Hi AndrewPrabhakar,

     

    No worries at all, your follow-up questions are completely valid. Log Analytics API authentication and IAM setup can be a little confusing at first.

    You can use the Log Analytics REST API outside of Power BI, such as in PowerShell or Python scripts, which is actually a better fit for your needs. While Power BI uses the same API under the hood, it's not ideal for managing very large historical datasets directly. PowerShell or Python allows for more control over incremental exports and file storage.

    For this setup, you'll generally need:

    • An Azure AD App Registration
    • API permissions for Azure Monitor / Log Analytics
    • A client secret or certificate
    • IAM access like Log Analytics Reader or Monitoring Reader on the workspace

    Once set up, your script can authenticate to Azure, run KQL queries for recent data, export results to CSV files, and save them to SharePoint or a folder. Power BI can then connect to the folder using the Folder connector and combine the files automatically during refresh.

    Since you’re looking for a low-cost or no-cost solution, PowerShell with Windows Task Scheduler and SharePoint or folder storage is likely the best approach without needing Fabric capacity or extra services.

    It's also a good idea to export smaller daily or hourly files instead of large cumulative ones to keep Power BI refreshes stable and avoid performance issues.

     

    Thank you.