Forum Discussion
Data Refresh Error for Cosmos DB in Power BI Desktop
Hi Anonymous ,
It seems you are experiencing a refresh issue in Power BI Desktop when connecting to Cosmos DB. The error you're encountering is: "DataSource.Error: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."
One possible solution is to reduce the amount of data being imported, as this might help with the refresh issue.
Additionally, you can check if you are able to connect to the same server and database from Excel or SSMS. If you are not able to connect, then the issue is not isolated to Power BI and you should fix the connectivity issue at your end.
If you are able to connect, then you can try changing the server name/IP address and verifying if the database name is correct. You can also try using both Windows credentials and SQL Server user ID and password.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.