Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Matias1256
Regular Visitor

Unable to create PowerBI - Azure Databricks connection with OAuth

Hi,

I am unable to create connection from PowerBI to Azure Databricks with OAuth(Azure AD authentication). I have successfully created vnet data gateway and we can create connection using that exact gateway with PAT. So the issue only exists when trying to use OAuth. 

Here is the error:
Unable to create connection for the following reason: OAuth login through the data gateway was unsuccessful. Specific error details available below and in the gateway logs.

Details: xxxx-vnet-gateway: The service returned an invalid token. Please contact your IT administrator if this issue persists. Please have this information handy if you choose to create a support ticket. Session Id: xxxxx RequestId: xxxxx Cluster URI: https://api.powerbi.com Status code: 400 Time: Thu May 22 2025 14:22:41 GMT+0300 (Eastern European Summer Time)

1 ACCEPTED SOLUTION

Hi @Matias1256 ,

 

Use PAT authentication it will be good for production applications. We have a 50k + users tenant I never seen anyone using Oauth authentication on service with databricks connections.

 

Thanks,

Sai Teja 

View solution in original post

12 REPLIES 12
v-kathullac
Community Support
Community Support

Hi @Matias1256  ,

Thank you for reaching out to Microsoft Fabric Community Forum.

 

can you try below debug steps to resolve your issue.

  1. Generate a Personal Access Token (PAT) from Databricks under User Settings > Access Tokens
  2. Copy and use the PAT as the Account key in the authentication section
  3. Ensure the Databricks user has permissions to access workspace, cluster, and SQL endpoints
  4. Verify the on-premises gateway is installed, configured, and online
  5. In your data source settings, set Authentication method to Key
  6. Check that the host URL in the data source path is correctly formatted:   {"host": "adb-<workspace-id>.<region>.azuredatabricks.net"}
  7. Use tools like Postman to test the token with a REST API call to validate it
  8. If the connection test fails but you’re confident in the setup, enable Skip test connection
  9. Make sure the gateway machine has internet access to reach the Databricks workspace
  10. Consider testing with a personal gateway mode in Power BI Desktop
  11. Recreate the data source in the gateway if configuration seems stuck or corrupted
  12. If issues persist, gather error logs and contact Microsoft or Databricks support for deeper analysis

Regards,

Chaithanya.

Hi,

 

We can create the connection with PAT as said in the first post. The problem is that OAuth doesn't work.

Hi @sergej_og ,

 

I suggest reaching out to Microsoft Support by raising a ticket. Microsoft will analyze backend logs and provide a resolution


Below is the link to create Microsoft support ticket:
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket

 

Regards,

Chaithanya.

I don't get you.
I don't have any reason to raise a ticket to MS.
Just try to support Matias1256.

Regards

Appologies @sergej_og ,

 

instead of tagging the @Matias1256  i tagged you sorry for that 

 

@Matias1256 can you raise a support ticket for this so that they can assit you in addressing the issue you are facing.

 

Regards,

Chaithanya.

sergej_og
Super User
Super User

Working setup for me:
Using on-prem gateway and using Key as the auth method.
This key you can create within databricks env in your "user settings".
Of course, permissions need to be in place.

sergej_og_0-1748328204795.png


Maybe an alternative approach for you.

Yes Key/PAT authentication works but not OAuth.

Ok, you have a working approach.
That's nice. Enjoy your data...

Why do you want to use OAuth so badly?

v-kathullac
Community Support
Community Support

Hi @Matias1256 ,

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

Regards,

Chaithanya

BhavinVyas3003
Super User
Super User

Update Gateway: Ensure the VNet Data Gateway is updated to the latest version. OAuth via gateway requires recent updates.

Enable OAuth in Gateway:

  • Go to Power BI Service → Manage Gateways.
  • Edit your Databricks data source.
  • Under Authentication method, select OAuth2.
  • Click Sign in and authenticate with an Azure AD user who has access to Databricks.

Check Azure AD App Permissions:

  • Ensure Azure Databricks Enterprise App has admin consent and necessary Graph/API permissions.
  • The user must have access to both the workspace and cluster in Databricks.

Token Mapping (if custom DNS or Private Link used):

  • Ensure your token is valid and not being blocked by custom DNS settings or network isolation.
  • Check Azure Private Link and DNS resolution settings.

Thanks,
Bhavin
Problem solved? Hit “Accept as Solution” and high-five me with a Kudos! Others will thank you later!

Re-created the gateway, but we still have the same error. I cannot find Azure Databricks Enterprise App so that might be the issue. We have SCIM provisioning and related Enterprise Apps in place.

Hi @Matias1256 ,

 

Use PAT authentication it will be good for production applications. We have a 50k + users tenant I never seen anyone using Oauth authentication on service with databricks connections.

 

Thanks,

Sai Teja 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.