Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dears,
I tried to refresh the data only with 2 weeks of data and it worked (to test the gateway and everything is running fine )
After that, i put incremental refresh to pull the whole data but I always receive this error .
so why it worked with 2 weeks and didn't work with 3 years of data ?
Data source error: {"error":{"code":"DM_GWPipeline_Gateway_InvalidConnectionCredentials","pbi.error":{"code":"DM_GWPipeline_Gateway_InvalidConnectionCredentials","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"[Microsoft][ThriftExtension] (14) Unexpected response from server during a HTTP connection: Unauthorized/Forbidden error response returned, but no token expired message received."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourceKind","detail":{"type":1,"value":"Databricks"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourcePath","detail":{"type":1,"value":"{\"host\":\"adb-4001480147023167.7.azuredatabricks.net\",\"httpPath\":\"\\/sql\\/1.0\\/warehouses\\/707c521bc160ab69\"}"}},{"code":"Microsoft.Data.Mashup.CredentialError.Reason","detail":{"type":1,"value":"AccessUnauthorized"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.DataSources","detail":{"type":1,"value":"[{\"kind\":\"Databricks\",\"path\":\"{\\\"host\\\":\\\"adb-4001480147023167.7.azuredatabricks.net\\\",\\\"httpPath\\\":\\\"\\\\/sql\\\\/1.0\\\\/warehouses\\\\/707c521bc160ab69\\\"}\"}]"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.Reason","detail":{"type":1,"value":"AccessUnauthorized"}}],"exceptionCulprit":1}}}
w
Solved! Go to Solution.
Thankyou, @Deku, for your response.
Hi ahmedshalabyy12,
We appreciate your question on the Microsoft Fabric Community Forum.
From what I understand, the Power BI refresh worked for only 2 weeks because during that time, the data volume and number of API calls made to Azure Databricks were limited. When you enabled incremental refresh to include 3 years of data, Power BI started sending many parallel queries (one for each partition or date range) to Databricks. This increased the authentication load on the gateway. If the credentials or tokens are not handled properly for each query, it causes the error:
DM_GWPipeline_Gateway_InvalidConnectionCredentials — AccessUnauthorized.
This error can also happen if a large data pull (like 3 years) causes the token to expire or if the Databricks SQL warehouse times out or blocks the long query. That is why a smaller period (2 weeks) works but the full dataset does not.
Please follow these steps which may help fix the issue:
You can see the troubleshooting step for the error in the screenshot attached below:
Also, here are some helpful links:
Connect Power BI to Azure Databricks - Azure Databricks | Microsoft Learn
Create a SQL warehouse - Azure Databricks | Microsoft Learn
If you find this response useful, please mark it as the accepted solution and give kudos. This will help other community members with similar questions.
If you have any more questions, please feel free to ask the Microsoft Fabric community.
Thank you.
You can also use incremental refresh policy. Apply policy but don't refresh in service. You can manually apply the policy once you have deployed to service with tabular editor, then manually refresh each partition one by one with ssms to reduce the load
Thankyou, @Deku, for your response.
Hi ahmedshalabyy12,
We appreciate your question on the Microsoft Fabric Community Forum.
From what I understand, the Power BI refresh worked for only 2 weeks because during that time, the data volume and number of API calls made to Azure Databricks were limited. When you enabled incremental refresh to include 3 years of data, Power BI started sending many parallel queries (one for each partition or date range) to Databricks. This increased the authentication load on the gateway. If the credentials or tokens are not handled properly for each query, it causes the error:
DM_GWPipeline_Gateway_InvalidConnectionCredentials — AccessUnauthorized.
This error can also happen if a large data pull (like 3 years) causes the token to expire or if the Databricks SQL warehouse times out or blocks the long query. That is why a smaller period (2 weeks) works but the full dataset does not.
Please follow these steps which may help fix the issue:
You can see the troubleshooting step for the error in the screenshot attached below:
Also, here are some helpful links:
Connect Power BI to Azure Databricks - Azure Databricks | Microsoft Learn
Create a SQL warehouse - Azure Databricks | Microsoft Learn
If you find this response useful, please mark it as the accepted solution and give kudos. This will help other community members with similar questions.
If you have any more questions, please feel free to ask the Microsoft Fabric community.
Thank you.
that's also another solution to get token with long life time
thank you
You can also use incremental refresh policy. Apply policy but don't refresh in service. You can manually apply the policy once you have deployed to service with tabular editor, then manually refresh each partition one by one with ssms to reduce the load
i thought about this solution to open ssms and refresh the facts one by one this might work
The error is related to authorisation. Are you sure you still have permissions to read the underlying data on databricks?
Yes i have refreshed this dataset with only 2 weeks of data about 50m of rows
now the dataset maybe around 1b of rows , so i spam receive this error for 4 times
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 55 | |
| 32 | |
| 18 | |
| 14 |