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: Choose 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.
    • Prior to v7.2.2: Selecting Reports returns both Reports and Paginated Reports.
    • v7.2.2+: Selecting Reports returns Reports, selecting RDL Reports returns Paginated Reports.
    • See Object Filters Cheat Sheet for details.
  4. Optional: List of Specific Apps (comma separated): 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. Optional: List of Specific OrgApps (comma separated): Provide a comma-separated list of Org Apps to retrieve. An empty value or * collects all available Org Apps. See the PREREQUISITES and NOTES below for details:

PREREQUISITES:

  • Grant Tenant.Read.All to the Azure Application used for the Power BI connection profile.
  • Enable Scope: Collect as admin > Collect objects as admin on the Advanced tab.
  • OrgApps must be selected under Power BI Object Types for this filter to take effect.

NOTES:

  • Org Apps are supported in Metric Insights v7.2.2+.
  • To create an Org App on the Power BI side, enable it in Tenant settings by activating Users can discover and create org apps, then open the Workspace and choose New > Org App.
  1. 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
  • Org Apps (v7.2.2+)

*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.
OrgAppsRetrieves Org Apps, and any Reports already nested inside them, from workspaces matching the Workspace filter. No standalone content objects (Reports, Dashboards, Semantic Models, Tables not nested in an Org App) are retrieved unless also selected.
  • The List of Specific Apps filter is ignored.
  • The List of Specific OrgApps filter applies (or * for all Org Apps).
  • A workspace appears in the results only if it holds a matching Org App.
OrgApps, content objectsRetrieves all selected content-object types plus Org Apps (and their nested Reports) from workspaces matching the Workspace filter. Workspaces may optionally also be selected; it does not change the result.
  • The List of Specific Apps filter is ignored.
  • The List of Specific OrgApps filter applies (or * for all Org Apps).
Apps, OrgAppsRetrieves Org Apps (and their nested Reports) from workspaces matching the Workspace filter, plus Apps and App content filtered by the List of Specific Apps (or *for all Apps). Content objects or Workspaces selection does not change the result.
  • The List of Specific OrgApps filter applies to Org Apps only.
  • Selecting OrgApps makes the Workspace filter apply even though Workspaces itself was not selected. Org Apps are always children of a workspace, unlike Apps.
  • Caution: if the Workspace filter excludes the workspace an App belongs to, that App is still listed, but its content (for example, the image used for its tile) may not resolve, because that workspace was never scanned. This can only happen when OrgApps is also selected, selecting only Apps always ignores the Workspace filter.

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
Enable this parameter 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
  • Enabled: Native PNGs and PDFs are captured from Reports, Report tabs, and Paginated Reports via the Power BI REST API. Dashboards are still captured via Selenium, because the Power BI REST API does not support image export for Dashboards.
    • NOTE: Native image/PDF/PPT collection for Paginated (RDL) Reports is not supported for Service Principal.
  • Disabled: All content  (including Reports, Report tabs, Paginated Reports, and Dashboards) is captured via Selenium (browser screenshot).
REQUIREMENTS FOR THE REST API CAPTURE: 
  • All Semantic Models from the exported report (including those with a DirectQuery connection) must reside on a Premium or Embedded capacity.
  • Go to app.powerbi.com, from the header access Settings > Admin Portal > Tenant settings > Enable Export reports as image files
4OleDB: Collect Data from OleDB
  • Enabled: Get data from OleDB instead of DAX API, a Remote Agent is required.
    • NOTE: Not supported for Service Principal.
  • Disabled: Get data using DAX API without using a Remote Agent.
NOTES:
If data is fetched using DAX API (OleDB: Collect Data from OleDB is disabled):
  • DirectQuery Semantic Models data is limited by 100,000 rows or 1,000,000 values per request;
  • Only DAX queries are supported.
If data is fetched from OleDB:
  • A Remote Agent is required;
  • Additional software installed on the Remote Agent 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 (Enabled), or in the UI (Disabled).
NOTES:
  • It is recommended to enable the parameter.
  • If the parameter is disabled, 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.