# Microsoft Power BI

## Before you start

To connect Microsoft Power BI to Select Star, you will need...

* Admin access to Microsoft Entra ID (formerly Azure AD)
* Admin access to Microsoft Fabric (formerly Power BI Admin Portal)

Complete the following steps to enable metadata, lineage, and popularity of your Microsoft Power BI in Select Star.

1. [Create an Azure app](#id-1.-create-an-azure-app)
2. [Create a security group in Microsoft Entra ID](#id-2.-create-a-security-group-in-microsoft-entra-id)
3. [Enable the Power BI service admin settings](#id-3.-enable-the-power-bi-service-admin-settings)
4. [Add Azure app to your workspace](#id-4.-add-azure-app-to-your-workspace)
5. [Connect Power BI API to Select Star](#id-5.-connect-power-bi-api-to-select-star)

## 1. Create an Azure app

1\. Open the [Azure Portal](https://ms.portal.azure.com/#allservices) and sign in.

2\. Search for **App registrations**, and select it.

3\. Click **New registration**.

4\. Fill in the required information:

* Name: type "Select Star"
* Supported account types: leave the default value
  * "Accounts in this organizational directory only (xxxxxxxxx only - Single tenant)"
* Redirect URI - leave empty

5\. Click **Register**.

![Screenshot shows the filled registration form.](/files/cdqXBoGQQAfcUjMvp7l5)

6. From the Overview page, copy the **Application (client) ID** and **Directory (tenant) ID**, and securely store them for next steps.

![Screenshot shows where to obtain the Client ID, and Tenant ID](/files/JVdd5SmWzIgxZc4P92es)

7\. Click the **Certificates & secrets** from the left menu.

8\. Under Client secrets, click **+ New client secret**.

![Screenshot shows the new client secret button in the Certificates and secrets tab.](/files/r7fKruIt6C7rkO36lfsS)

In the Add a client secret window, enter a description, select an expiry time, and click **Add**.

* *Sample description: Secret used to connect Select Star to Microsoft Power BI*

Copy the client secret **Value** and securely store it for the next steps.

![Screenshot shows where to obtain the Client secret value in the Certificates and secrets tab](/files/CdktzM4ACLgt6gFtIvDp)

## 2. Create a security group in Microsoft Entra ID

1\. Open the [Azure Portal](https://ms.portal.azure.com/#allservices) and sign in.

2\. Search for **Microsoft Entra ID**, and select it.

3\. Click the **Groups**, under Manage section.

![Screenshot shows the Groups tab for an app in the Azure Active Directory section.](/files/8E38aOHKmF9bjUNPVP3f)

4\. Click **New group**.

5\. Fill in the required information:

* Group type - select "Security"
* Name - type "Power BI - API Access"
* Group description - enter any description or leave empty
  * *Sample description: Security group to grant API access*

6\. Click "No members selected" to open a drawer. Search for **Select Star** user and select it. Click the **Select** button to confirm.

7\. Click **Create**.

![Screenshot shows the filled in form, and selected memeber for security group.](/files/DI6d7OH7iZFFizC3BMf3)

By the end of these steps, you have registered an application with Microsoft Entra ID and created a Security Group with the appropriate member.

## 3. Enable the Power BI service admin settings

1\. Open [Power BI admin portal](https://app.powerbi.com/admin-portal/) and sign in.

2\. Click **Tenant Settings** under the Admin Portal.

* You must have admin access to Microsoft Fabric to configure these settings

3\. Under **Developer settings**:

* Expand **Service principals can call Fabric public APIs**
  * Set this to Enabled.
  * Add your security group you created in [Step 2](#id-2.-create-a-security-group-in-microsoft-entra-id), under **Specific security groups.**
  * Click **Apply**.

4\. Repeat the process for the subsections under the **Admin API settings** section.

* Open the section, Set **Enabled,** and add the security group you created in [Step 2](#id-2.-create-a-security-group-in-microsoft-entra-id). Click **Apply**.

You must complete the steps for the following sections under **Admin API settings**:

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

<figure><img src="/files/B6DvBPx9gbPoFEDtcvs8" alt=""><figcaption><p>The screenshot shows the highleted sections, needed to enabled for Microsoft Power BI Integration</p></figcaption></figure>

## 4. Add Azure app to your workspace

1\. Open [Power BI](https://app.powerbi.com/) and sign in.

2\. Search for the workspace you want to enable access for, and from the three-button menu, select **Workspace access**.

![Screenshot shows the "Workspace access" button in workspace list.](/files/SHTTsvO1inxcPBlLPRNP)

3\. Click **+ Add people or groups**

4\. Search for the app you created in [step 1](#id-1.-create-an-azure-app), i.e, **Select Star**, and select it. Set the permissions to **Contributor**.

5\. Click **Add**, and close the drawer.

6\. Repeat the above steps for all workspaces you want to be added to Select Star.

{% hint style="warning" %}
**Important!** If you have any Power BI reports using Semantic Models from other workspaces, please make sure to add the Azure App you created in [**Step 1**](#id-1.-create-an-azure-app) as a **Contributor** to all those workspaces.\
This is required to ingest the reports' metadata and generate the column-level lineage.
{% endhint %}

## 5. Connect Power BI API to Select Star

1\. Go to the Select Star **Settings**. Click **Data** in the sidebar, then **+ Add** to create a new Data Source.

![Screenshot shows the "Add Data source" tab for PowerBI in Select Star.](/files/n0dpRuVVZWNC5WY5BFqW)

2\. Fill in the required information:

* **Client ID:** Application (client) ID of Azure App from [step 1.6](#id-1.-create-an-azure-app) above.
* **Client Secret:** Client secret value of Azure App from [step 1.8](#id-1.-create-an-azure-app) above.
* **Tenant ID:** Directory (tenant) ID of Azure App from [step 1.6](#id-1.-create-an-azure-app) above.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.selectstar.com/integrations/powerbi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
