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.
Table of Contents
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: ‘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.

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
- The ‘Set-AzSqlDatabase’ command was found in the module ‘Az.Sql’
- Cannot Open Server Requested By The Login Azure SQL
- The ‘New-AzSqlServer’ command was found in the module ‘Az.Sql’, but the module could not be loaded
- Requested tenant identifier ‘00000000-0000-0000-0000-000000000000’ is not valid.
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.