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, and build a Dataset from it.
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.
2. Configure Azure App And Grant Tenant.Read.All Permission
- Configure Azure app as described in the Microsoft documentation.
- 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
- Copy the Workspace ID value
4. Enable Metadata Collection in Metric Insights
Access Admin > System > System Variables
- Enter
ENABLE_METADATA_COLLECTION
in 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.
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
- Auth Type: Service Principal
- Application ID: Enter the Application ID of the previously configured Azure App.
- Client Secret: Enter the Client Secret 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
Password
- 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
OAuth
- 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
5.3. Configure Other Data Source Parameters
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 |
6. Build Dataset with Log Analytics
Access the Datasets tab
- [+ New Dataset]
- Select a Category
- Access the Data tab
- Report: Select System/Log Analytics
- [Save]
- [Enable & View]
NOTE: See Create a Dataset from Microsoft Power BI Cloud for more information on building Datasets from Microsoft Power BI Cloud.