powerbiscannermetadata icon indicating copy to clipboard operation
powerbiscannermetadata copied to clipboard

Solution to pull in the Power BI Scanner API Metadata via Power Automate, and Power BI Template file

Power BI Metadata Scanner API & Template

This is based on the PowerBI.Tips Blog Post about this repo. For full instructions, please see the article here.

Building the Solution

The majority of credit needs to go to Ferry Bouwman who initially created a viable solution that can easily be integrated into a report. He created a GitHub repo that included a Power Automate flow that truly covers the entire process of automating the API call.

The following is building off Ferry's solution, including the new metadata schema that is now available. There is more that I want to accomplish in this solution, but to get the Scanner API and a template to connect to the data, you can do so using the steps below.

Also many thanks to Rui Romano's solution and Power BI template. You can find his full solution here:

Pre-Requisites Before Use

Before starting, you must have already completed the following in order to use the Scanner API at all. Please see the documentation for each to set up:

The Solution Bundle

The solution includes the following to implement:

  • A Power Automate Flow that handles the entire API request and call
  • A Scheduled Refresh Flow that refreshing daily and triggers the Flow above
  • A Power BI Template report to connect to the metadata results

Download the Solution on GitHub.

Installing & Using

Import the API Scanner Flow

The first step is to import the Flow pbitips_ScannerAPI into your tenant. Once you do this, there are a few variables and actions to update before running.

  • tenant: The tenant of your Active Directory
  • clientId: The Client ID of your registered App
  • clientSecret: The Client Secret value of your registered App
  • SharePoint Library: What SharePoint library you want to save the files
    • NOTE: Remember this location as it will be used in Power Query
  • Folder Location: The folder location to save all returned scans
    • NOTE: Remember this location as it will be used in Power Query
  • Folder Location Trigger: A different folder with a different name, to trigger the refresh run.