Skip to main content

Publish to the Power BI service from Databricks

This page describes how to publish data from Databricks to Microsoft Power BI service. Microsoft Power BI service is a cloud-based business analytics platform that enables users to connect to, visualize, and analyze data.

When you integrate Databricks as a data source with the Power BI service, you bring Databricks’ scalable data processing and performance to all users.

If you want to connect Power BI Desktop to Databricks, see Connect Power BI Desktop to Databricks.

note

The Databricks connector for Power BI supports the Arrow Database Connectivity (ADBC) driver. Learn more here.

Requirements

  • Your data must be in Unity Catalog, and your compute must be Unity Catalog enabled. Hive metastore is not currently supported.

  • You must have a Power BI Premium license (Premium capacity, Premium Per User (PPU), or Microsoft Fabric capacity).

  • You must enable Read Write for the XMLA Endpoint in your Power BI capacity. Follow this link for instructions.

  • If you are authenticating using machine-to-machine (M2M) OAuth, ensure you have set up a Databricks service principal. See Configure service principals on Databricks for Power BI.

  • If users want to edit semantic models in the Power BI Service after publishing, you must enable Users can edit data models in Power BI service (preview) in the workspace settings. You can also edit the Semantic Model using Tabular Editor by making a connection using the XMLA endpoint.

  • If your Power BI workspace uses a private link, you must update the dataset's datasource credentials manually in Power BI.

Publish Databricks tables to a Power BI semantic model

When using Databricks as a data source with Power BI Online, you can create Power BI semantic models from tables or schemas directly from the Databricks UI.

  1. Sign in to your Databricks workspace and click Data icon. Catalog in the sidebar to open Catalog Explorer.

  2. Select a compute resource from the drop-down list at the top right.

  3. Open a catalog and select the schema or tables to be published. Do not select from a hive metastore or the samples catalog.

  4. On the upper right, click Use with BI tools for a schema or Open in a dashboard for a table.

  5. Select Publish to Power BI workspace.

  6. In the Connect to partner dialog, click Connect to Microsoft Entra ID to authenticate.

    • Databricks requires the following permissions to be granted to the registered Entra ID app, Databricks Dataset Publishing Integration:

      • Content.Create

      • Dataset.ReadWrite.All

      • Workspace.Read.All

        Entra ID App

      For more information, see Microsoft Entra Permissions.

    • If you can't accept these permissions, your organization might require Entra Admin approval for these permissions. See Review admin consent requests for instructions.

    • If there is a "Need admin approval" message, your Power BI Global admin might need to turn on Admin consent requests before you can proceed. See Grant permissions when Admin consent is disabled.

  7. In the Power BI workspaces field, select the Power BI workspace.

  8. In Dataset Mode, select either DirectQuery or Import.

  9. In Authentication Method in Power BI, select OAuth or PAT (Personal Access Token).

    Databricks recommends using OAuth since it allows for fine-grained access control and user-level auditing. OAuth credentials might need to be configured on the Power BI semantic model settings page under Data source credentials. If you select Personal Access Token (PAT), a PAT is created on your behalf to allow Power BI to access the semantic model.

    If you want to authenticate using M2M OAuth, you can configure this on the Power BI service after publishing. See Set up M2M OAuth.

  10. In Dataset Name, select Publish as a new data set or Use an existing data set.

    When you choose Use an existing dataset, the following is true:

    • If the semantic model exists, it is not overwritten. Updates only append new records in a given schema.
      • If the selected table is not part of the existing semantic model, it's added.
      • If the table was already in your semantic model and new columns were added after the last update, those columns are automatically added.
      • You can choose a different storage model for the new table to create a composite semantic model.

    If you have an existing semantic model that you want update while you keep existing data connections in place, choose Use an existing dataset. If you want to create a new one with a new semantic model, choose Publish as new data set.

  11. Click Publish to Power BI.

  12. It might take 10 to 20 seconds for the semantic model to publish. When publishing is complete, click Open Power BI to open your Power BI semantic model in a new tab.

Features and notes

  • When publishing a schema containing multiple tables, all tables with columns are published. Tables with no columns are not published.
  • Comments on a table's columns in Databricks are copied to the descriptions of corresponding columns in Power BI.
  • Foreign key relationships are preserved in the published dataset. However, Power BI only supports one active relationship path between any two tables. When multiple paths are present in the schema in Databricks, some of the corresponding relationships in Power BI are set to inactive. You can later change which relationships are active or inactive in the data model view in Power BI.
  • When using OAuth or an on-premises data gateway, credentials might need to be configured under “Data source credentials” on the Power BI dataset settings page.
  • Currently, users can only publish directly to Power BI workspaces in their home tenant. Publishing in tenants where they are guest users is not supported.

When admin consent is disabled, users are unable to request approval for applications requiring permissions. This might occur if user consent is blocked or limited to verified publishers in the Microsoft Entra admin center, and admin consent requests are not permitted.

To allow users to request permission to publish to the Power BI service, you must be either a Global Admin or a Cloud Application Admin to enable and approve consent requests.

A Global Admin or Cloud Application Admin must first enable admin consent requests:

  1. In the Microsoft Entra admin center, navigate to Consent and permissions.
  2. Click Admin consent settings from the sidebar.
  3. Toggle Admin consent requests to Yes.
  4. (Optional) To designate reviewers who can help evaluate consent requests, select Add users under Reviewers. Note that while reviewers can evaluate requests, only a Global Administrator can grant final admin consent.
  5. Configure Consent requests expire after (days) to set how long consent requests remain valid before expiring.
  6. Users can now submit consent requests for the Power BI service.

After a user submits a consent request, a Global Admin or a Cloud Application Admin must approve the request:

  1. In the Microsoft Entra admin center, click Admin consent requests on the sidebar.
  2. Select the Databricks Dataset Publishing Integration request.
  3. Click Review permissions and consent.
  4. Sign in with your Microsoft Entra ID and click Accept.

The user requesting access to Power BI can now publish to the Power BI service.

Set up M2M OAuth

After you publish to the Power BI service from Databricks, you can configure M2M OAuth on the Power BI service. Make sure you have a service principal set up on Databricks. See Configure service principals on Databricks for Power BI.

You can configure M2M OAuth from a semantic model or a service gateway.

Use a semantic model for M2M OAuth

Configure your Databricks connection for M2M OAuth on the Power BI service using a semantic model. For more about semantic models, see Semantic models in the Power BI service.

To configure credentials:

  1. In Power BI, navigate to the workspace that contains the semantic model.
  2. Click More options (horizontal kebab menu) > Settings.
  3. Navigate to Data source credentials and click Edit Credentials.
  4. In Authentication method, choose Basic.
  5. In User name, enter your service principal application ID.
  6. In Password, enter your service principal secret.
  7. Select the appropriate privacy level setting for your data source.
  8. If you want to enable SSO, enable the last option.
  9. Click Sign in.

Use a service gateway for M2M OAuth

You can configure your Databricks connection for M2M OAuth on the Power BI service from a Power BI VNet or on-premises data gateway. Databricks client credentials for an on-premises gateway require Power BI gateway v3000.270.10 or above. For more about Power BI gateways, see the official Microsoft site.

Power BI does not fully support VNet data gateways in its REST APIs. Therefore, you must manually update data source connections to use Databricks Client Credentials in the UI.

To configure credentials:

  1. In Power BI, click the gear icon in the upper-right to access settings.
  2. Click Manage connections and gateways.
  3. Click + New to create a new connection.
  4. Select either On-premises or Virtual network. The required credentials are the same for both gateways.
  5. In Gateway cluster name, select your appropriate gateway.
  6. In Connection name, enter your connection name.
  7. In Connection type, select Azure Databricks.
  8. In Server Hostname, enter the Databricks SQL warehouse hostname.
  9. In HTTP Path, enter the SQL warehouse HTTP path.
  10. Under Authentication, specify your authentication credentials.
    1. In Authentication method, select Databricks Client Credentials.
    2. In Databricks Client ID, enter your service principal Client ID.
    3. In Databricks Client Secret, enter the service principal client secret.
  11. In Privacy level, select Organizational.
  12. Click Create.

Troubleshooting

Error

Notes

“Approval required” when launching Publish to Power BI for the first time

If you see this message, you will need Entra Admin approval before you can grant permissions to this integration feature. Contact your Entra Admin to approve the request. Follow this link for instructions.

PowerBINotLicensedException

Ensure that you have a Power BI Premium license (Premium capacity, Premium Per User (PPU), or Microsoft Fabric capacity).

We couldn't deploy this dataset. Contact a capacity administrator to make sure XMLA read/write support is enabled in the capacity settings on the Power BI Premium capacity, and then try again. For additional information, see 'XMLA read/write support' in the product documentation.

Contact your Power BI capacity administrator to enable Read and Write capabilities under XMLA endpoint in the capacity settings. Follow this link for instructions.

XMLA endpoint feature is disabled. Turn on Analyze in Excel feature in PowerBI.com to enable this feature.

Contact your Power BI capacity administrator to enable Read and Write capabilities under XMLA endpoint in the capacity settings. Follow this link for instructions.

CapacityNotActive

Your Fabric or Power BI capacity might be paused. Contact your capacity administrator to check the capacity status.

The database with the name of '<ccon>_</ccon>' already exists in the '<ccon>workspace </ccon>' _.

Ensure that you have the permissions to create a semantic model. Then, retry Publish to Power BI to publish the semantic model with an incremented version number.

You cannot use Direct Lake mode together with other storage modes in the same model. Composite model does not support Direct Lake mode. Remove the unsupported tables or switch them to Direct Lake mode.

Since Publish to Power BI creates a semantic model with Import or DirectQuery mode, it cannot be used to publish to an existing dataset that uses Direct Lake mode. Follow this link to learn more.

The '<euii> *</euii>' user does not have permission to call the Discover method.

Ensure that you are publishing to a Power BI workspace with a Premium license mode. You cannot publish to a workspace with a Pro license mode.

Either the '<euii> *</euii>' user does not have permission to create a new object in '***', or the object does not exist.

You might have the Viewer role in the Power BI workspace. Check whether you have the permissions to create a semantic model. Follow this link for more information.

“Failed to update data source credentials: [Microsoft][thriftextension] (14) Unexpected response from server during a HTTP connection: Unauthorized/Forbidden error response returned, but no token expired message received.” when editing data source credentials on Power BI

Check whether your Databricks workspace is publicly accessible. If your workspace is using Private Link or IP access lists, then you might need to configure a Power BI on-premises gateway.

Additional resources

Support

Power Query documentation