IMPORTANT:
- Configuring Log Analytics requires the following permissions:
- Data.Read (required for the Log Analytics configuration);
- Tenant.Read.All (Why BI Optimizer Requires Tenant.Read.All Permission?).
- To assign a role that grants access to the Log Analytics Workspace, the user must have at least the Application Administrator role.
- This is required to configure the Azure App.
This article explains how to configure Log Analytics for Microsoft Power BI Cloud Lineage collection.
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.
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:
- Prerequisites for Connecting to Microsoft Power BI Cloud
- Configure authentication based on the selected method:
- OAuth: Configure Microsoft Power BI OAuth in Azure AD
- Service Principal: Configure Service Principal Auth for Microsoft Power BI
- Authentication user must be a Fabric Administrator, or Service Principal authentication must be used.
Table of contents:
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:
- Create a Log Analytics Workspace in your Azure subscription.
- Enable the
microsoft.insightsresource provider. - Assign the Log Analytics Contributor role to the user setting up the connection.
- In Power BI Admin portal, enable Azure Log Analytics connections under Tenant Settings.
- Connect to Azure Log Analytics Workspace (as displayed on the screenshot).
Once done, logs will begin streaming to Azure, and you can confirm this by querying tables such as PowerBIDatasetsWorkspace in the Azure portal.
2. Copy Log Analytics Workspace ID from Azure
Access Log Analytics workspace > Overview tab
- Copy the Workspace ID value
3. Configure Azure App
Set up authentication as described in the Microsoft documentation. The required steps are:
- Configure Azure app:
- Register an app.
- Access API permissions > [+ Add a permission] > APIs my organization uses > Log Analytics API > Delegated permissions > Data.Read
- [Add permissions]
- Grant app access to the Log Analytics workspace:
- Log Analytics Workspace > Access control (IAM) > [Add role assignment]
- Select the Reader role.
- Access Members > [+ Select members] > Enter the name of your app in the Select box > Select > [Review + assign]
NOTE:To assign a role that grants access to the Log Analytics Workspace, the user must have at least the Application Administrator role.
- Assign this role via Azure Portal > User > Select a User > Assigned roles > [+ Add assignments] > Application Administrator
4. Grant Tenant.Read.All Permission
Access the Azure App to be used for the Data Source connection.
- Under Manage, click on API Permissions.
- [ + Add a permission]
- Scroll to and select Power BI Service.
- Click on Delegated permissions.
- Under "Tenant", find and check Tenant.Read.All
- [Add permissions]
5. Enable Metadata Collection in Metric Insights
Access Admin > System > System Variables
- Enter
ENABLE_METADATA_COLLECTIONin the search field - Click the gear icon
- Assigned Value:
Y - [Save], then [Commit Changes]
NOTE: See Setting System Variables for information on System Variables configuration.
6. Enable Metadata Collection with Log Analytics
- Enter
POWERBI_FETCH_METADATA_WITH_LOG_ANALYTICSin the search field. - Click the gear icon.
- Assigned Value:
Y. - [Save], then [Commit Changes]
7. Configure Power BI Cloud Data Source in Metric Insights
7.1. Create a Microsoft Power BI Cloud Data Source
See the instructions on creating a new Microsoft Power BI Cloud Data Source for your Metric Insights version:
7.2. Configure Auth Parameters
Proceed with the Data Source parameters configuration based on the selected Auth Type:
v7.2.0+
- Auth Type: Service Principal.
- Application ID: Enter the Application ID of the previously configured Azure App.
- Client Secret: Enter the Client Secret Value of the previously configured Azure App.
- See Add a Client Secret for details.
- Directory (tenant) Id: Enter Directory (tenant) Id of the previously configured Azure App.
- To find this value, open the Azure App > Overview tab.
Prior to v7.2.0
- Auth Type: Service Principal.
- Application ID: Enter the Application ID of the previously configured Azure App.
- Client Secret: Enter the Client Secret Value of the previously configured Azure App.
- See Add a Client Secret for details.
- Server:
https://app.powerbi.com. - Directory (tenant) Id: Enter Directory (tenant) Id of the previously configured Azure App.
- To find this value, open the Azure App > Overview tab.
v7.2.0+
- Auth Type: Password.
- Username, Plugin Password: Enter the credentials of a Fabric Administrator user.
- Application ID: Enter the Application ID of the previously configured Azure App.
Prior to v7.2.0
- Auth Type: Password.
- Application ID: Enter the Application ID of the previously configured Azure App.
- Server:
https://app.powerbi.com. - Username, Plugin Password: Enter the credentials of a Fabric Administrator user.
v7.2.0+
- Auth Type: OAuth.
- Application ID: Enter the Application ID of the previously configured Azure App.
- Directory (tenant) Id: Enter Directory (tenant) Id of the previously configured Azure App.
- To find this value, open the Azure App > Overview tab.
- [Get Token], enter credentials of a Fabric Administrator in the pop-up window.
Prior to v7.2.0
- Auth Type: OAuth.
- Application ID: Enter the Application ID of the previously configured Azure App.
- Server:
https://app.powerbi.com. - Directory (tenant) Id: Enter Directory (tenant) Id of the previously configured Azure App.
- To find this value, open the Azure App > Overview tab.
- [Get Token], enter credentials of a Fabric Administrator in the pop-up window.
7.3. Configure Other Data Source Parameters
See parameter configuration details specific to your MI version:
- Select Log Analytics Dataset.
- Log Analytics Workspace ID: Enter the ID of the previously configured Log Analytics Workspace.
| Parameter Name | Value | |
| 1 | Scope: Types to collect | DASHBOARD, TILE, SEMANTIC_MODEL, TABLE, REPORT, LOG |
| 2 | Log Analytics: Workspace ID | The ID of the previously configured Log
Analytics Workspace |
| Parameter Name | Value | |
|---|---|---|
| 1 | Log Analytics Workspace ID | The ID of the previously configured Log Analytics Workspace |
| 2 | Object types to collect | DASHBOARD, TILE, SEMANTIC_MODEL, TABLE, REPORT, LOG |
7.4. Configure Object List Refresh
7.4.1. Manually Refresh Object List
Access Source Objects tab
- [Refresh list]
- Once the list is refreshed, the Log Analytics object is displayed.
7.4.2. Add Object List Refresh Trigger
Adding an Object List Refresh Trigger allows to automatically refresh the Object List at the configured time interval.
- Generate Object List: automatically.
- Object List Refresh Trigger: Select a daily Trigger.
- See What is Data Collection Trigger? for details.