Configure Power BI Log Analytics

This article explains how to configure Log Analytics for Microsoft Power BI Cloud and use it to build a Dataset in Metric Insights.

Before proceeding, ensure that all prerequisites are met and that initial configuration has been completed based on your selected authentication type. Then, enable Log Analytics integration in both Azure and the Power BI Admin Portal, and configure the required Azure App. Once setup in Azure is complete, return to Metric Insights to enable metadata collection and configure the Power BI Cloud Data Source, collect the Log Analytics object, sync metadata, and build a Dataset from the Log Analytics object.

NOTE: The easiest and cheapest way to get logs into a Workspace in Azure is to allow a Service Principal to have access to the Power BI Workspaces that must stream their logs into the Log Analytics Workspace. The other, more expensive way is to allow Power BI Workspaces to stream their logs into the Log Analytics Workspace in Azure.

Prerequisites:

Table of contents:

  1. Enable Log Analytics Integration in Azure and Power BI
    1. Check Log Export
  2. Configure Azure App And Grant Tenant.Read.All Permission
  3. Copy Log Analytics Workspace ID from Azure
  4. Enable Metadata Collection in Metric Insights
  5. Configure Power BI Cloud Data Source in Metric Insights
    1. Create a Microsoft Power BI Cloud Data Source
    2. Configure Auth Parameters
    3. Configure Other Data Source Parameters
    4. Refresh Object List
    5. Sync Metadata
  6. Build Dataset with Log Analytics
    1. View Log Analytics Dataset

1. Enable Log Analytics Integration in Azure and Power BI

NOTE: Log Analytics Workspace is not a Power BI workspace and needs to be created separately, as described in the Microsoft documentation referenced below.

Follow Microsoft’s official guidance to configure Log Analytics for use with Power BI.

To complete the setup described in the Microsoft article, you will:

Once done, logs will begin streaming to Azure, and you can confirm this by querying tables such as PowerBIDatasetsWorkspace in the Azure portal.

1.1. Check Log Export

Access Azure portal > Log Analytics workspace > Logs

If configured correctly, Log Analytics from Power BI activity logs are displayed.

2. Configure Azure App And Grant Tenant.Read.All Permission

  1. Configure Azure app as described in the Microsoft documentation.
  2. Grant Tenant.Read.All permission.
    • Access App's Overview page > API Permissions > [Add a permission] > Delegated permissions > Tenant.Read.All

3. Copy Log Analytics Workspace ID from Azure

Access Log Analytics workspace > Overview tab

  1. Copy the Workspace ID value

4. Enable Metadata Collection in Metric Insights

Access Admin > System > System Variables

  1. Enter ENABLE_METADATA_COLLECTION in the search field
  2. Click the gear icon
  3. Assigned Value: Y
  4. [Save], then [Commit Changes]

NOTE: See Setting System Variables for information on System Variables configuration.

5. Configure Power BI Cloud Data Source in Metric Insights

5.1. Create a Microsoft Power BI Cloud Data Source

See Establish Connectivity to Microsoft Power BI Cloud for instructions on creating a new Microsoft Power BI Cloud Data Source.

5.2. Configure Auth Parameters

Proceed with the Data Source parameters configuration based on the selected Auth Type:

Service Principal

  1. Auth Type: Service Principal
  2. Application ID: Enter the Application ID of the previously configured Azure App.
  3. Client Secret: Enter the Client Secret of the previously configured Azure App.
  4. Server: https://app.powerbi.com
  5. Directory (tenant) Id: Enter Directory (tenant) Id of the previously configured Azure App
    • To find this value, open the Azure App > Overview tab

Password

  1. Auth Type: Password
  2. Application ID: Enter the Application ID of the previously configured Azure App.
  3. Server: https://app.powerbi.com
  4. Username, Plugin Password: Enter the credentials of a Fabric Administrator user

OAuth

  1. Auth Type: OAuth
  2. Application ID: Enter the Application ID of the previously configured Azure App.
  3. Server: https://app.powerbi.com
  4. Directory (tenant) Id: Enter Directory (tenant) Id of the previously configured Azure App
    • To find this value, open the Azure App > Overview tab
  5. [Get Token], enter credentials of a Fabric Administrator in the pop-up window

5.3. Configure Other Data Source Parameters

See parameter configuration details specific to your MI version:

v7.1.1

 


Parameter Name Value
1 Scope: Collect as admin true
2 Scope: Types to collect
DASHBOARD, TILE, SEMANTIC_MODEL, TABLE, REPORT, LOG, USAGEUSER_PERMISSIONS
3 Scope: Workspace Filter
Use this filter to narrow down search output
4 OleDB: Collect Data from OleDB true
5 OleDB: Use old table ID false
6 Power BI Premium: Collect media using API true
7 Log Analytics: Workspace ID
The ID of the previously configured Log Analytics Workspace

Prior to v7.1.1


Parameter Name Value
1 Collect objects as admin true
2 Power BI Premium: Collect media using API true
3 Log Analytics Workspace ID The ID of the previously configured Log Analytics Workspace
4 Object types to collect DASHBOARD, TILE, SEMANTIC_MODEL, TABLE, REPORT, LOG
5 Old table ID false
6 OleDB Data true
7 Workspace Filter Use this filter to narrow down search output

5.4. Refresh Object List

Access Source Objects tab

  1. [Refresh list]
  2. Once the list is refreshed, the Log Analytics object is displayed

5.5. Sync Metadata

Access Metadata tab

  1. [Sync Metadata]

6. Build Dataset with Log Analytics

Access the Datasets tab

  1. [+ New Dataset]
  2. Select a Category
  3. Access the Data tab
  4. Report: Select System/Log Analytics
  5. [Save]
  6. [Enable & View]

NOTE: See Create a Dataset from Microsoft Power BI Cloud for more information on building Datasets from Microsoft Power BI Cloud.

6.1. View Log Analytics Dataset