cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot export embedded dashboard widget as CSV or other formats except PNG

rajg
New Contributor

I’ve integrated a Databricks dashboard into my web application for all my users, following the guidelines in this article:
Embedding Databricks Dashboards.

This integration worked perfectly initially. However, I’m now encountering an issue with exporting widgets from the embedded dashboard. When I attempt to export a widget, the file doesn’t download and I get an error message: "Failed - Needs authorization" or "File wasn't available on site." This issue occurs for all export formats, except PNG.

rajg_0-1760793195625.png

rajg_1-1760793235941.pngrajg_2-1760793253909.png

Interestingly, I am able to export widgets directly from my Databricks portal without any issues.

Could this be a code-related issue, or is it something that needs to be addressed on the Databricks Admin side?

1 REPLY 1

stbjelcevic
Databricks Employee
Databricks Employee

Hi @rajg ,

Based on the link you shared, it looks to me like you have an external embedding situation? If so, this is a feature that is not currently available, but it is a commonly requested feature. External dashboard embedding is currently in Public Preview, which means features could change by the time it is generally available.

It makes sense that you can export from within Databricks, as you would need to be authenticated to view that data. With basic embedding, which requires users to be authenticated, I imagine this would also work.

If your use case is already using basic embedding (i.e. authenticated Databricks users), then the issue seems like your browser is blocking third-party cookies. When you try to export a file like a CSV, your browser initiates a new download request to the Databricks domain from within the embedded iframe. If your browser's privacy settings block third-party cookies, it prevents your Databricks authentication cookie from being sent with that request. Databricks then sees an unauthenticated request and blocks the download, resulting in the "Failed - Needs authorization" error. PNG doesn't need to go all the way back to Databricks to generate the export, which is why it works but all of the other ones don't. Source for allowing 3rd party cookies