> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elementary-data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Power BI

After you connect Power BI, Elementary will automatically and continuously extend the lineage to the report/dashboard level.
This will provide you end-to-end data lineage to understand your downstream dependencies, called exposures.

### Create & authorize a Service Principal

Elementary makes use of a service principal secret to authenticate with the Power BI API on your behalf.
Please follow the [official guide by Microsoft](https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal) for creating and authorizing a service principal for Power BI.
Make sure you're going through all steps up until but not including "Step 5 - Embed your content" (Which isn't currently our goal).
Also make sure that the security group you've created is allowed access to every relevant Workspace in your account.
Do NOTICE - "My Workspace" isn't accessible by service principals and thus can't be analyzed with our product.

### Allow Power BI's Admin API

Go to Power BI's Admin portal -> Tenant Settings -> Admin API settings
Enable the following features, and apply at least for the Service principal's security group (created on the last step):

* `Service principals can access read-only admin APIs`
* `Enhance admin APIs responses with detailed metadata`
* `Enhance admin APIs responses with DAX and mashup expressions`

Those features will allow Elementary to get all required info for computing the data lineage graph.

### Connecting Power BI to Elementary

Navigate to the **Account settings > Environments** and choose the environment to which you would like to connect Power BI.
Choose the Power BI connection and provide the following details to validate and complete the integration.

* **Tenant:** Your Microsoft tenant which is usaully your company's domain. e.g. `my-company.com`
* **Client ID**: The client ID of the new Microsoft Entra app you've created on the first step.
* **Client Secret:** The new client secret you've created on the first step.

### Limitations

* Due to service principal limitations - we cannot analyze the default "My Workspace" Workspace.
* The lineage currently doesn't apply to the following entities: (But would be in the future)
  * Paginated Reports
  * Dataflows
  * Datamarts
