Establish Connectivity to Microsoft Power BI Cloud (v7.2.0+)

This article describes how to connect to Microsoft Power BI in order to load data into Datasets and Reports in Metric Insights.

PREREQUISITES

The whole process comprises:

  1. Create New Data Source
  2. Provide Required Parameters
  3. Provide Optional Parameters
  4. Advanced Configuration
  5. Microsoft Power BI Cloud Elements and User Tokens

1. Create New Data Source

Access Admin > Collection & Storage > Data Sources

  1. [+New Data Source]
  2. Choose "Microsoft Power BI Cloud" from Plugin drop-down list.
  3. [Next]
  4. Enter a descriptive Data Source Name.
  5. [Create]

2. Provide Required Parameters

NOTE: Enabling OAuth has the following benefits compared with the Username/Password authentication model:

  • Ability to view content in iframes based on user account permissions rather than service account permissions;
  • Row-level security (RLS) without the need to use User Maps on MI side (you only have to enable RLS in Power BI).

See Configure Microsoft Power BI OAuth in Azure AD for details.

  1. Select the Auth Type:
    • OAuth: Enter Client Secret and click [Get Token] (after entering Application ID) to grant permission to Office 365 API.
      • You can enable Client Secret authorization for your Azure app. After the Client Secret has been generated, the Username/Password authorization will no longer work.
      • Optionally, for Client Secret expiration tracking, provide Directory (tenant) Id which can be found on the Overview tab of the Azure app.
    • Service Principal: Provide Client Secret value and Directory (tenant) Id.
      • See Configure Service Principal Auth for Power BI for instructions on this auth type configuration.
      • NOTE: Enable Power BI Premium: Collect media using API on the Advanced tab to be able to collect Power BI Objects for a Data Source.
    • Password: Provide Username and Password.
      • The username must be a cloud-only Microsoft Power BI user or, if an AD user, the AD user must exist/be synced in Azure AD for Power BI authentication.
      • Embedding and image generation rely on service account embed token.
      • RLS-like filtering can be configured using User Maps, but the embed token remains tied to the service account. If full RLS support is required, consider using OAuth.
    • Identity Profile: Provide an Identity Profile.
  1. Enter Application ID of the registered Azure app that represents Metric Insights to connect to Power BI.

3. Provide Optional Parameters

  1. Workspace Capacity Type Filter: Specify whether to fetch objects from Premium, Non-Premium, or all Workspaces.
  2. Workspace: Select whether to collect objects from Personal Workspace Only, All Shared Workspaces, or Selected Shared Workspaces.
  3. Power BI Object Types:
    • By default, the plugin is configured to collect Dashboards, Tiles, Reports, Semantic Models, Tables, and Workspaces.
    • Remove any object types you do not need to fetch.
    • Select Apps to be able to collect objects from Apps.
    • Selecting Reports returns both Reports and Paginated Reports.
    • See Object Filters Cheat Sheet for details.
  4. Optional: List of Specific Apps (comma separated): Optionally provide a comma-separated list of App names to retrieve. Use * to fetch all Apps.
    • NOTE: Apps must be selected under Power BI Object Types for this filter to take effect.
  5. System Objects: Select which objects to fetch.

Optionally, toggle on:

Expand or collapse content Object Filters Cheat Sheet

Object Types available for selection:

  • Dashboards
  • Tiles
  • Reports
  • Semantic Models
  • Tables
  • Workspaces
  • Apps

*Content objects = Dashboards, Tiles, Reports, Semantic Models, Tables

Selected Object TypesResult
Content objectsRetrieves all selected object types from workspaces matching the Workspace filter.
  • The List of Specific Apps filter is ignored, even if specified.
Workspaces,content objectsRetrieves all selected object types from workspaces matching the Workspace filter.
  • The List of Specific Apps filter is ignored, even if specified.
Apps, Workspaces, content objectsRetrieves all selected object types from workspaces matching the Workspace filter, plus Apps and App content filtered by the List of Specific Apps (or * for all Apps).
Apps, content objects

Retrieves Apps and App content filtered by the List of Specific Apps (or * for all Apps). 

  • The Workspace filter is ignored, even if specified.

4. Advanced Configuration

NOTE: If you have selected OleDB: Collect Data from OleDB and want to be able to get Data from Power BI Semantic Models (to create Metrics, Reports, and Datasets in Metric Insights), you must utilize the Metric Insights Remote Agent to connect to Power BI directly.

If you are using AD, you may want to run the Remote Agent service as an AD service account:

  • Access Services > Metric Insights Data Processor Daemon > Properties > Log On, select AD service account.

 


ParameterDescription
1Power BI Type

Select the Power BI environment your organization uses. This determines which Power BI service URL is used for connections.

  • Commercial (app.powerbi.com)
  • Government:
    • GCC (app.powerbigov.us)
    • GCC High (app.high.powerbigov.us)
    • DoD (app.mil.powerbigov.us)
2Scope: Collect as admin
Select this option to allow the User who created the Data Source with the Power BI admin account to pull all Workspaces and their objects into Metric Insights without having to grant Admin access to each workspace explicitly.

NOTES:
  • This option only works for Power BI admin accounts with the Tenant.Read.All permission. Without this permission, enabling Scope: Collect objects as admin will not work.
  • If the Tenant.Read.All permission is not granted, clear Scope: Collect objects as admin. In this case, the plugin will only retrieve Workspaces that the user’s OAuth token has explicit access to. The user must be explicitly added to all required Workspaces.
  • When this option is selected, the App filter is not available. Workspace Filter can filter Workspaces by name.
3Power BI Premium: Collect media using API
Select this parameter to extract native PNGs and PDFs from Paginated Reports, Reports, and Report tabs using API.
To be able to fetch native PNGs and PDFs:
  • Go to app.powerbi.com, from the header access Settings > Admin Portal > Tenant settings > Enable Export reports as image files
NOTE: All Semantic Models from the exported report, including the ones with a Direct Query connection, must reside on a Premium or Embedded capacity.
4OleDB: Collect Data from OleDB
  • When selected: Get data from OleDB instead of DAX API, an RDP is required.
  • When cleared: Get data using DAX API without using an RDP.
NOTES:
If data is fetched using DAX API (OleDB: Collect Data from OleDB is disabled):
  • Only data from V2 Workspaces can be fetched;
  • The returned Semantic Model data is limited by 100,000 rows;
  • Only DAX queries are supported.
If data is fetched from OleDB:
  • An RDP is required;
  • Additional software installed on RDP machine is required:
    • Analyze in Excel
    • .NET
  • Both MDX and DAX queries are supported.
5OleDB: Use old table ID
Select this parameter whether or not to collect tables from OleDB connector with the old ID format.
6Check: Client Expiration Date, Client Secret ID
These parameters work only with OAuth and configure the display of Client Secret expiration date. Note that these parameters must be configured and the value of Directory (tenant) Id must be provided in order to display Client Secret expiration date:
  • Select Check: Client Expiration Date to display the expiration date. If the expiration date has been retrieved and this parameter is then cleared, the expiration date will disappear after the next Test Connection.
  • Client Secret ID: Enter the Secret ID generated on the Certificates & secrets tab of the Azure app.
7Get token from Plugin
Specify whether the token used to display External Report images in iframes is fetched from the plugin ("Y"), or in the UI ("N").
NOTES:
  • It is recommended to set the parameter to "Y".
  • If the parameter is set to "N", a new token is fetched in the UI for each embedding and image collection. The same applies for External Reports with the Drill-Down Authentication parameter set to "Power BI OAuth" in the Report type.
8Other Advanced Data Source Configuration parametersSee Advanced Data Source Configuration for more details.

5. Microsoft Power BI Cloud Elements and User Tokens

  1. You can create Datasets and view all the elements or Datasets using this Data Source from the respective tabs.
  2. Navigate to the Permissions tab to assign Data Source access to Groups or Power Users.
  3. User Tokens are displayed in the corresponding menu and can be deleted by clicking the trashcan icon. The lifetime of each token is 45 minutes.