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

# Power BI API Integration

## Why API Integration?

The Power BI API integration enables direct publishing of semantic models
from Honeydew to the Power BI Service without requiring manual downloads.

This approach provides several key benefits:

* **Streamlined workflow**: Publish models directly from Honeydew without
  downloading `.pbit` or `.pbix` files first
* **Accessibility**: Users without Power BI Desktop can still publish
  models to Power BI Service
* **Automation**: Enables automated publishing workflows and CI/CD
  integration

## API Integration

Honeydew integrates with the Power BI API through a service principal authentication, using a **Microsoft Entra ID App**.

<Note>
  You will need your [Cloud Application Administrator](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#cloud-application-administrator)
  or [Application Administrator](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#application-administrator) to complete these steps
  — you may not have access yourself. This will be required if the creation of registered applications is not enabled for the entire organization.
</Note>

<Steps>
  <Step title="Create an Entra ID App">
    <Note>
      You will need your [Cloud Application Administrator](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#cloud-application-administrator)
      or [Application Administrator](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#application-administrator) to complete these steps
      — you may not have access yourself. This will be required if the creation of registered applications is not enabled for the entire organization.
    </Note>

    1. Open the [Azure Portal](https://portal.azure.com/)
    2. In the search bar, search for **App registrations**. Open it and start a new registration by clicking **New registration**
    3. On the **Register an application** page, enter the following details:
       * **Name**: `Honeydew Power BI Integration`
       * **Supported account types**: `Accounts in this organizational directory only (Single tenant)`
       * **Redirect URI**: Leave blank
    4. Click **Register**
    5. On the homepage of your newly created application, from the **Overview** screen, copy the values for the following fields and store them in a secure location:
       * Application (client) ID
       * Directory (tenant) ID
    6. From the left menu of your newly created application page, open **Manage** > **Certificates & secrets**
    7. Click **New client secret**
    8. In the **Add a client secret** dialog, enter the following details:
       * **Description**: `Honeydew Power BI Integration`
       * **Expires**: Choose an appropriate expiry date
    9. Click **Add**
    10. Copy the value of the newly created client secret and store it in a secure location
  </Step>

  <Step title="Create a security group in Microsoft Entra ID">
    <Note>
      You will need your [Cloud Application Administrator](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#cloud-application-administrator)
      or [Application Administrator](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#application-administrator) to complete these steps
      — you may not have access yourself.
    </Note>

    1. Open the [Azure Portal](https://portal.azure.com/)
    2. In the search bar, search for **Microsoft Entra ID** and select it from the drop-down list
    3. In the left menu, expand the **Manage** section, and click **Groups**
    4. At the top of the page, click **New group** and enter the following details:
       * **Group type**: `Security`
       * **Group name**: `Honeydew Power BI Integration`
       * **Membership type**: `Assigned`
       * Under **Members**, click **No members selected**, in the **Add members** dialog that opens up search for the application you created in the previous step
         (e.g. `Honeydew Power BI Integration`) and click **Select** to add it.
    5. Click **Create** to create the group
  </Step>

  <Step title="Assign security group and role in Microsoft Power BI workspace">
    <Note>
      You will need to be at least a member of the Microsoft Power BI workspace to which you want to add the security group to complete these steps —
      you may not have access yourself. Ensure that you add the security group from the homepage and not the admin portal.
    </Note>

    1. Open the [Microsoft Power BI Service Homepage](https://app.powerbi.com/home)
    2. Click on **Workspaces** in the left menu bar
    3. Click on the workspace you want to add Honeydew access to (repeat these steps for each workspace)
    4. In the top bar, on the right, click **Manage Access**
    5. Click **Add people or groups** and search for the security group you created in the previous step (e.g. `Honeydew Power BI Integration`)
    6. In the role drop-down, choose **Member** as the role
    7. Click **Add** to add the group
  </Step>

  <Step title="Enable extra admin API settings in Microsoft Power BI">
    <Note>
      You will need your Power BI Administrator to complete these tasks — you may not have access yourself.
    </Note>

    To enable the Microsoft Power BI admin API:

    1. Log in to the [Power BI Admin Portal](https://app.powerbi.com/admin-portal)
    2. In the left menu under **Admin Portal**, click **Tenant settings**
    3. Under the **Developer settings** heading, click to expand **Service principals can use Fabric APIs** and ensure it is **Enabled**
       * Under **Specific security groups (Recommended)**, add the security group created above (e.g. `Honeydew Power BI Integration`)
       * At the bottom of the expanded section, click the **Apply** button
    4. Under the **Admin API settings** heading, configure the following:
       * Click to expand the **Service principals can access read-only admin APIs** expandable and ensure it is **Enabled**
         * Under **Specific security groups**, add the security group created above (e.g. `Honeydew Power BI Integration`)
         * At the bottom of the expanded section, click the **Apply** button
       * Click to expand the **Enhance admin APIs responses with detailed metadata** expandable and ensure it is **Enabled**
         * Under **Specific security groups**, add the security group created above (e.g. `Honeydew Power BI Integration`)
         * At the bottom of the expanded section, click the **Apply** button
       * Click to expand the **Enhance admin APIs responses with DAX and mashup expressions** expandable and ensure it is **Enabled**
         * Under **Specific security groups**, add the security group created above (e.g. `Honeydew Power BI Integration`)
         * At the bottom of the expanded section, click the **Apply** button
  </Step>

  <Step title="Provide access to Honeydew connection in Power BI">
    <Note>
      You must have at least **User with resharing** permissions in Power BI for the Honeydew connection to complete these steps.
    </Note>

    1. Open the [Microsoft Power BI Service Homepage](https://app.powerbi.com/home)
    2. In upper right corner click the gear icon for **Settings** and then click on **Manage connections and gateways**
    3. In the **Connections** tab, identify the connection used for Honeydew (note that it should have a **Gateway cluster name** configured).
    4. Click on the three dots next to the right of the connection name, and then click **Manage users** in the popup menu.
    5. In the **Manage users** dialog, search for the security group created above.
       Provide the group with the **User** permission and click **Share**.
  </Step>

  <Step title="Configure Honeydew">
    <Note>
      Only users with the **Admin** role in Honeydew can complete these steps.
    </Note>

    1. In Honeydew, go to the **Settings** page
    2. Click on **Power BI** in the left menu
    3. Fill in the following fields:
       * **Application ID**: The Application (client) ID from the Entra ID App you created
       * **Tenant ID**: The Directory (tenant) ID from the Entra ID App you created
       * **Client Secret**: The client secret from the Entra ID App you created
    4. Click **Save**
  </Step>

  <Step title="Test the integration">
    1. In Honeydew, click on the branch, and in the menu click on
       **Branch Integrations** -> **Power BI** -> **Publish to Semantic Model**
    2. In the dialog that opens up, select the **domain** to publish, the **Power BI workspace** to publish to,
       and provide a name for the **Semantic Model** (or choose an existing one to override).
    3. Click **Publish** to publish the semantic model to Power BI.
    4. Once the publishing is completed, click on the link in the notification to open up the semantic model in Power BI.
    5. In Power BI Service, create a new report using the published semantic model as the data source,
       and validate that you are able to build reports successfully.
  </Step>
</Steps>
