Skip to main content

A package to analyze Power BI reports.

Project description

Power BI Analyzer

This project contains two tools for finding unused data sources in your Power BI (Microsoft Fabric) reports. These tools analyze the reports' data models and identify columns not used in visualizations. Unwanted access to this data can pose a security risk, and it is essential to identify and remove unused columns to reduce the risk of data breaches.

BACKGROUND: On June 19, 2024, Nokod Security published a warning about the easy exploitation of a data leakage vulnerability in the Microsoft Power BI service. This vulnerability potentially affects tens of thousands of organizations and allows anonymous Internet viewers to access sensitive data, including employee and business data, PHI, and PII. For details about the exploit see: https://nokodsecurity.com/blog/in-plain-sight-how-microsoft-power-bi-reports-expose-sensitive-data-on-the-web/

Nokod Security created the “Power BI Analyzer,” as a simple and free tool for organizations to assess their exposure to this vulnerability. If you need help with this tool, please contact amichai@nokodsecurity.com or uriya@nokodsecurity.com.

Installation

To install the package, run the following command:

pip install power-bi-analyzer

1st tool - Analyze reports shared with the entire organization

This tool includes a Python module that interacts with the Power BI API. It sends requests to get the list of all reports shared with the entire organization and analyzes them to find any unused data sources.

Scripts

The script runner must have Fabric Admin (or Global Admin) permissions, the minimum permission required to interact with the Power BI Admin API.

  • SharedReportsAnalyzer: This module fetches and analyzes data from Power BI reports that are shared within an organization. It uses an access token for authentication and interacts with the Power BI API.

Usage

You may provide the name of the output CSV file and the summary file as arguments, but they are optional. If you do not provide them, the script will create them in the same directory.

Example usage:

shared-reports-analyzer --output-folder "path/to/output folder"

Output

CSV file containing the following columns:

  • Report ID
  • Report name
  • Shared by
  • Number of hidden columns
  • Unused columns

2nd tool - Analyze reports that are shared to the web

This tool includes a Python module that gets a CSV file with a list of all the URLs of reports published to the web and analyzes them to find any unused data sources.

Scripts

The script's runner does not require any permissions or credentials. However, before execution, a Power BI admin needs to export a list of embed codes in your organization.

  • PublicReportsAnalyzer: This module analyzes data sources of Power BI reports that are shared to the web.

requirements

To execute this script, a Power BI admin must export a CSV file with all your organization's "Embed Codes." This CSV contains a list of reports published to the web with their: name, workspace, publisher, status, and public URL of the report. To export the CSV, use the following link: https://app.powerbi.com/admin-portal/embedCodes and press 'Export' Or navigate in the Power BI UI to 'Settings' -> 'Admin Portal' -> 'Embed Codes' -> 'Export.'

Usage

The script requires the full path to the Embed Codes CSV file as an argument. You may also provide the name of the output CSV file and the summary file as arguments but they are optional. If you do not provide them, the script will create them in the same directory.

Example usage:

public-reports-analyzer --embed-codes-path "path/to/embed code.csv" --output-folder "path/to/output folder"

Output

CSV file containing the following columns:

  • Report name
  • Workspace name
  • Published by
  • Status
  • Embed URL
  • Number of hidden columns
  • Unused columns

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

power_bi_analyzer-1.0.3.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

power_bi_analyzer-1.0.3-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file power_bi_analyzer-1.0.3.tar.gz.

File metadata

  • Download URL: power_bi_analyzer-1.0.3.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for power_bi_analyzer-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7f5e1974b04cca0e271f8da58f7f422acbdca524c55d9eb1b7beed1fa1fb5756
MD5 62545d73e4f18a732f89e3724c0d9428
BLAKE2b-256 004dc2d01a53b0e936d1348662efb072d39546999c4da7ee83d9d00d3f66c894

See more details on using hashes here.

File details

Details for the file power_bi_analyzer-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for power_bi_analyzer-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 15f36f01137a71f7a3b34dcd1fe787ef775932724669fcf23acc90e832fc2d39
MD5 feb876bb31c940fa83504144af97fcdb
BLAKE2b-256 60d9f476b00eead6b25a80e6d6d18aa5fadd9dba665aaf32f879b59f697b04a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page