An error happened while reading data from the provider: While connecting to Azure SQL Database from Power BI

In this Azure article, we will discuss the solution for the error “An error happened while reading data from the provider: ‘Could not load file or assembly ‘System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. Either a required impersonation level was not provided”.

I was unable to connect to Azure SQL database from Power BI and I got this error.

An error happened while reading data from the provider: While connecting to Azure SQL Database from Power BI

Recently, I was trying to connect to Azure SQL database from Power BI, But after clicking on the connect button I got this error. The complete error message was as below

An error happened while reading data from the provider: ‘Could not load file or assembly ‘System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'”

You can see it here.

An error happened while reading data from the provider

An error happened while reading data from the provider: ‘Could not load file or assembly ‘System.EnterpriseServices [Solution]

The solution for this issue is very simple. What you need to do is make sure to run the Power BI Desktop application with Run as administrator mode and then try connecting the Azure SQL database from the Power BI Desktop again. The moment I have done the same thing, I was able to connect to the Azure SQL Database successfully without any issues.

  • Right-click on Power BI Desktop and select Run as administrator mode.
unable to connect to Azure SQL database from Power BI

Then try the same steps to connect the Azure SQL database from the Power BI Desktop application and this time you should able to connect successfully.

You may also like following the below articles

Voila! it is so easy to solve the error “An error happened while reading data from the provider: ‘Could not load file or assembly ‘System.EnterpriseServices”. If you are facing the same issue, you can simply follow the above mentioned instruction to fix the same issue. Thanks for reading this article. Hope this informantion will help you.