Forum Discussion

jenrom_flix's avatar
jenrom_flix
New Member
1 year ago
Solved

Enable programmatically logging to Log Analytics for Power BI Workspaces

I'm trying to find a way to automate the process of enabling query log offloading to Log Analytics for Power BI workspaces. My assumption was that this functionality would be available through the Fa...
  • BhavinVyas3003's avatar
    1 year ago

    Currently, enabling query log offloading to Log Analytics for Power BI workspaces can only be done via the Power BI Service UI. There are no direct API endpoints for automating this. However, you can use PowerShell cmdlets for some workspace management tasks, or combine Azure Automation and Logic Apps for scalable monitoring, though they won't directly enable log offloading.

  • v-hashadapu's avatar
    1 year ago

    Hi jenrom_flix , Thank you for reaching out to the Microsoft Community Forum.

     

    As of May 2025, enabling query log offloading to Azure Log Analytics for Power BI workspaces can only be done manually through the Power BI Service UI. There are no supported REST API endpoints, PowerShell cmdlets, or Microsoft Fabric APIs that allow this setting to be automated.

     

    You can use Robotic Process Automation (RPA) tools like Power Automate Desktop or UiPath to simulate the manual steps in the UI. These tools can be configured to log into Power BI Service, navigate to each workspace and enable the Log Analytics connection. While this method can work, it is not officially supported by Microsoft, it is fragile (prone to breaking if the UI changes) and it requires careful handling of credentials and error checking. It should only be used with strong monitoring, regular testing and stakeholder awareness that this is a temporary solution.

     

    To track and validate which workspaces have logging enabled, you can use the Power BI REST API (GET /admin/groups) to list workspaces and correlate that with data received in Log Analytics. This helps maintain visibility while relying on RPA. If this functionality is critical to your environment, it’s recommended to submit a request through the Fabric Ideas portal and get as many upvotes as possible, as Microsoft monitors it and features with most upvotes have more possibility to be released.

     

    If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
    Thank you.