Forum Discussion

rodneyc8063's avatar
rodneyc8063
Advocate I
1 year ago
Solved

PBI Gateway to Azure Databricks Connection Error: Unable to start OAuth login for this data source?

G'day folks   My team is looking into using Azure Databricks as a data source and am hitting an error   Background: Our Azure Databricks is on a "Private Link" I believe is the terminology (I nee...
  • v-ssriganesh's avatar
    v-ssriganesh
    1 year ago

    Hi rodneyc8063,

    Thank you for your follow-up. These are important questions, and I am happy to clarify the confusion regarding the Service Principal and Authentication Method when connecting Azure Databricks via a Power BI Gateway. Let's break it down:

    1. What is a Service Principal and When to Use it?

    A Service Principal is essentially an identity created in Azure Active Directory (AAD) that represents an application or service (like Power BI) rather than a user. It’s commonly used for automated, secure, non-interactive access to Azure resources, including Databricks. So, Yes, you can create a Service Principal in AAD and grant it access to Azure Databricks. This approach is often preferred over personal tokens for governance and security.

    Relevant offical doc link : Configure a service principal for Azure Databricks

    1. Which Authentication Method Should You Use with a Service Principal?
    • For Service Principal → Power BI Gateway → Databricks, AAD (Azure Active Directory) authentication is generally the best practice. However, PAT (Personal Access Token) is also valid if you prefer that route but requires token management (renewals).

    1. How to Set Up AAD Authentication with Service Principal (High-Level Steps)
    • Create a Service Principal in Azure AD. Assign it appropriate workspace permissions in Databricks (like Viewer, Editor, Admin, or custom RBAC roles).
    • Enable Service Principal Authentication in your Databricks workspace (if not already enabled). Grant the Service Principal access to the Databricks API (Workspace Admin → Admin Settings → Service Principals).
    • Use "Azure Active Directory" as the authentication method in Power BI Gateway configuration. When prompted for credentials, provide the Service Principal’s details (Client ID, Tenant ID, and Client Secret).

    1. Can a Regular User Use Their Own Token Instead?

    Yes, they can.
    A Personal Access Token (PAT) can be generated by any Databricks user with the right workspace access. However, for production scenarios and scheduled refreshes via a gateway, it’s generally better to use a Service Principal for better security and control.

    I trust this information proves useful. If it does, kindly Accept it as a solution and give it a 'Kudos' to help others locate it easily.
    Thank you.