Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I logged into my lap from my ad account (####\KavyaD) and login in to power bi using the same account. but due to a security concern, we have separate account to login into servers (####\KavyaDAU) . old server is ##.###.###.209 and recently bought a new server ##.###.###.6. i can go to remote desktop connection and log into the server and see the databases using ssms. and to access the server from local machine, i run the ssms by run as different user and use my KavyaDAU account to login. and i login to power bi using my ad account (KavyaD) and when i select get data and give the server ip address as ##.###.###.209, it connects. but when i add ##.###.###.6, it does not connect. gives an error saying " We encounted an error while trying to connect. Details: "Microsoft SQL: The target principal name is incorrect. Cannot generate SSPI context.". but it works for 209. then i tried login to ssms from my local machine by giving run as different user and gave credentials of my KavyaDAU account. that works for 209 but not works for 6. So there's a issue in server side not from power bi side. What should i do?
Solved! Go to Solution.
Hi @Kavi_9907
The error you’re getting points to a problem on your local machine rather than with SQL Server itself. Power BI Desktop relies on the .NET Framework assemblies to establish SQL connections, and the message about System.EnterpriseServices failing to load means that the required .NET components are either missing, corrupted, or not properly registered in your system’s Global Assembly Cache (GAC). That’s why SSMS works fine but Power BI fails — SSMS uses a different dependency chain. The way to resolve this is to first make sure your Windows is fully updated, then repair or reinstall the latest .NET Framework 4.8 runtime, as that will restore the missing assembly. After that, repair or reinstall Power BI Desktop to ensure it correctly hooks into the .NET runtime. In many cases, simply repairing .NET and then reinstalling Power BI fixes the issue completely. If your organization enforces strict security policies, you may also need your IT team to check that the Power BI process is allowed to load assemblies from the GAC.
Hi @Kavi_9907
As we haven’t heard back from you, we wanted to kindly follow up to check if the suggestions provided by the community members for the issue worked. Please feel free to contact us if you have any further questions.
Thanks and regards
Hi @Kavi_9907
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you
Hi @Kavi_9907 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
now database works when i open it through ssms seperately but when i import data into power bi, it gets an error.
"Loading assembly file 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed for data source type 'SQL'"
Hi @Kavi_9907 ,
In addition to the valuable points mentioned by @Poojara_D12 , another point for the cause of the error can be connection issues, which can occur due to authentication problems. For example, SQL Server may be configured for Windows Authentication only while thePower BI is attempting to use SQL Authentication with a username and password. Even if SQL Authentication is allowed, the login credentials might be incorrect or the specified login may not exist in SQL Server. In some cases, the login does exist but lacks the necessary permissions to access the target database.
Thank you
Hi @Kavi_9907
The error you’re getting points to a problem on your local machine rather than with SQL Server itself. Power BI Desktop relies on the .NET Framework assemblies to establish SQL connections, and the message about System.EnterpriseServices failing to load means that the required .NET components are either missing, corrupted, or not properly registered in your system’s Global Assembly Cache (GAC). That’s why SSMS works fine but Power BI fails — SSMS uses a different dependency chain. The way to resolve this is to first make sure your Windows is fully updated, then repair or reinstall the latest .NET Framework 4.8 runtime, as that will restore the missing assembly. After that, repair or reinstall Power BI Desktop to ensure it correctly hooks into the .NET runtime. In many cases, simply repairing .NET and then reinstalling Power BI fixes the issue completely. If your organization enforces strict security policies, you may also need your IT team to check that the Power BI process is allowed to load assemblies from the GAC.
Hi @Kavi_9907
The error you’re seeing, “The target principal name is incorrect. Cannot generate SSPI context”, indicates a Kerberos authentication issue rather than a Power BI-specific problem. Since you can connect to the old server (.209) but not the new one (.6), and the same credentials work via RDP but fail when connecting remotely through SSMS or Power BI, it suggests that the new SQL Server’s SPN (Service Principal Name) is either not registered correctly in Active Directory or not aligned with the service account running SQL Server. Kerberos requires the SPN to match the server name or IP being used, otherwise authentication fails. While you might temporarily bypass this by forcing SQL authentication instead of Windows authentication, the proper fix is on the server side: the AD/domain administrator should verify and register the correct SPN for the SQL Server service account on the new server and ensure that it matches the DNS name or IP you’re using to connect. This is why the .209 server works (its SPN is configured) but .6 does not. In short, you’ll need to raise this with your infrastructure or SQL admin team to configure SPNs correctly on the new server.
My team says this is happening due to someone has changed some services runing on server agent to a seperate account (#####auth) changing the default account (NT Services) and they are not aware of how to change it back to default settings.
Hi @Kavi_9907
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
My team says this is happening due to someone has changed some services runing on server agent to a seperate account (#####auth) changing the default account (NT Services) and they are not aware of how to change it back to default settings.
Hi @Kavi_9907 ,
Thanks for reaching out to the Microsoft fabric community forum.
In that case you will have to create a new SQL Server Installation and then get all the required data into the new SQL Server
Go to SQL Server Installation center and then select New SQL Server standalone feature from Installation pane, from there you can install the new SQL Server Instance.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Hi @Kavi_9907 ,
Thanks for reaching out to the Microsoft fabric community forum.
Please double-check whether the SQL service is running. If it isn’t, start the service.
To verify its status, go to Services, locate the SQL Server instance, and check the server’s current status there.
Additionally, Verify connectivity by checking for any network issues. For example, try pinging the IP address of the SQL Server from your machine to ensure the server is reachable.
For example, open Command Prompt or PowerShell and run ping <SQL_Server_IP> to confirm the server is reachable
Finally, Verify that the login credentials you are using have the necessary permissions to access the SQL Server and its databases.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Issue: New server (.6) fails with “Cannot generate SSPI context” → Kerberos authentication is broken.
✅ Fix:
- Register correct SPN for the SQL service account using setspn.
- Ensure SQL Server runs under a domain account, not LocalSystem.
- Use FQDN instead of IP when connecting.
- Check for clock sync between your machine and the server.
- Try SQL authentication as a workaround if needed.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.