Establish Connectivity to Microsoft Power BI Cloud
This article describes how to connect to Microsoft Power BI in order to load data into Datasets and Reports in Metric Insights.
PREREQUISITES
- Make sure all the Prerequisites for connecting to Microsoft Power BI have been met
- Refer to the Power BI Plugin Capabilities to understand for which type of Power BI Objects you can get data and images
The whole process comprises:
NOTE: If you are using Microsoft Power BI Cloud plugin on MI versions prior to v7.0.1a, follow the instructions from the article Update Microsoft Power BI Cloud Configuration to Ensure Image Refresh Functionality to ensure proper image collection functionality.
1. Create New Data Source
Access Admin > Collection & Storage > Data Sources
- [+ New Data Source]
- Choose "Microsoft Power BI Cloud" from Other drop-down list
- [Next Step]
2. Provide Required Parameters
- Select the Auth Type:
-
Password: provide Username and Plugin Password, note that 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
- If you choose the Password Auth Type, you will need to enable row-level security (RLS) in Metric Insights to be able to use RLS
- Identity Profile: provide an Identity Profile
-
OAuth: enter Client Secret and click [Get Token] 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
-
Password: provide Username and Plugin Password, note that 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
- Enter Application ID of the registered Azure app that represents Metric Insights (to connect to Power BI)
- Server: the URL of your Microsoft Power BI server (this is the same URL that you see when accessing Microsoft Power BI via your web browser)
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.
3. Provide Optional Parameters
-
App filter:
- "*": the plugin will collect Power BI objects from all available Apps
- App names (comma-separated, or wildcard patterns): the plugin will collect Power BI objects from the specified Apps
-
These three parameters work only with OAuth and configure the display of Client Secret expiration date. Note that the values for all three parameters must be provided in order to display Client Secret expiration date:
- To Check Client Expiration Date: whether or not the expiration date is displayed. If the expiration date has been retrieved and this parameter is then set to "N", the expiration date will disappear after the next Test Connection
- Secret Id can be found on the Certificates & secrets tab of the Azure app
- Directory (tenant) Id can be found on the Overview tab of the Azure app
- Collect objects as admin: Set to “true” to allow the User who created the Data Source with Power BI admin account to pull all Workspaces and their objects into Metric Insights without having to explicitly grant Admin access to each workspace.
NOTE:
- This parameter only works for Power BI admin accounts with the Tenant.Read.All permission. Without this permission, setting "Collect objects as admin" to "true" will not work.
- If the Tenant.Read.All permission is not granted, set "Collect objects as admin" to "false." 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.
- If this parameter is set to "true", App filter is not available, Workspace Filter can filter Workspaces by name.
-
Power BI Premium: Collect native PDFs: set to "true" to get native PDFs from Power BI
- NOTE: Native PDFs can be generated only with Power BI Premium accounts, otherwise, PDFs are generated using collected images
- Power BI Premium: Collect media using API: set to "true" 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,
- In the Microsoft Power BI Cloud plugin connection profile, set Power BI Premium: Collect media using API to "true".
NOTE: All semantic models from the exported report, including the ones with a Direct Query connection, must reside on a Premium or Embedded capacity.
- Get token from Plugin: specify whether the token used to display External Report images in iframes is fetched from plugin ("Y") or in the UI ("N")
NOTE: 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 Drill-Down Authentication parameter set to "Power BI OAuth" in the Report type.
-
Object types to collect: by default the plugin is configured to collect Dashboards, Reports, Datasets, Tiles and Tables (you may remove any object type you do not need to fetch)
- Enter "Workspace" and "App" to be able to collect objects from Workspaces and Apps
- Object type REPORT returns both Reports and Paginated Reports (RDLREPORT)
- Old table ID: specify whether or not to collect tables from OLE-DB connector with old ID format.
-
OleDB Data:
- "true": get data from OleDB instead of DAX API, an RDP is required
- "false": get data using DAX API without using an RDP
Note: If data is fetched using DAX API:
- Only data from V2 Workspaces can be fetched
- The returned Dataset data is limited by 100,000 rows
-
Workspace Filter:
- "*": the plugin will collect Power BI objects from all Workspaces the associated user has access to, except for My Workspace
- Workspace names (comma-separated or wildcard patterns): the plugin will collect Power BI objects from the specified Workspaces
- [Test Connection]
See Object Filters Cheat Sheet for details on configuring the App filter, Workspace filter, and Object types to collect parameters.
4. Advanced Configuration
If you have set OleDB Data to "true" on the previous step and want to be able to get Data from Power BI Datasets (to create Metrics, Reports, and Datasets in Metric Insights), you must utilize the Metric Insights Remote Data Processor to connect to Power BI directly.
- For more information on how to install and use the RDP, consult Configuring Remote Data Processors
If you are using AD, you may want to run the RDP service as an AD service account:
- Access Services > Metric Insights Data Processor Daemon > Properties > Log On, select AD service account
- Advanced Configuration settings can be set to default values unless Data Source requires more precise tuning
- See Advanced Data Source Configuration for more details
-
Use Proxy: set to "Yes" and choose a Proxy if your Data Source connection requires a proxy server
- See Create a Proxy for more details
- [Test connection] (this will also save your entries)
5. Microsoft Power BI Cloud Elements and User Tokens
- You can create Datasets and view all the elements or Datasets using this Data Source from the respective tabs
- Click Permissions to assign Data Source access to Groups or Power Users
- 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