Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

ERRORDetails: "Microsoft SQL: The target principal name is incorrect. Cannot generate SSPI context.

Hello,

 

I am trying to connect SQL SERVER database to import data to power bi. i get the following issue. 

 

We encountered an error while trying to connect.

 

Details: "Microsoft SQL: The target principal name is incorrect. Cannot generate SSPI context."

 

Its a local data base, sql server is 2016.

 

previously i importeted from another server everything was fine. i created this new server and unable to connect.

 

can anyone help.

 

regards 

10 REPLIES 10
MKazemee
New Member

Hi,

My server's IP address changed, and I faced this error and when I updated my server name to the new one in source setting, it worked well

ooodrey7
Advocate I
Advocate I

I had encountered the same error "Microsoft SQL: The target principal name is incorrect. Cannot generate SSPI context." when trying to refresh data on PBI Desktop. 

 

Before the error showed up, PBI Desktop could connect to the SQL DB and refresh data for the past 18 months. The error msg just showed up one day.

 

The SQL DB's Windows server password had expired. However, that password remains unchanged as per company policy. 

 

The following steps help to resolve my issue:

  1. Go to Power Query Editor window
  2. Click on "Data Source Settings" from the ribbon menu
  3. In the "Data Source Settings" window, select the affected data source and click on "Edit Permissions"
  4. In the "Edit Permissions" window, under "Credentials", click on "Edit".
  5. Select "Database" and fill up the SQL credentials.
  6. Save and refresh all data.

Had the same issue when connecting to Fabric Lakehouse via SQL endpoint and your solution worked. Thank you very much.

Thank you so much, it worked well for me.

 

Thank you so much! I thought it was just enough to change the Server Name and Database Name. Upon going to this part of the settings and refreshing the Database's Username and Password, it worked like a charm! Once again, thank you so much!

Exellent answer. Power BI is fantastic but the UI is a complete dogs breakfast now

Anonymous
Not applicable

Thank you very much. This worked for me!

v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

This is an issue about SQL SERVER. There could be many causes. You can reference these two posts. It would be good idea to post in  SQL Server Security Forum for assistance.

https://community.powerbi.com/t5/Desktop/The-target-principal-name-is-incorrect-Cannot-generate-SSA/m-p/97205

https://community.powerbi.com/t5/Power-Query/Microsoft-SQL-The-target-principal-name-is-incorrect-Cannot/td-p/69281

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
reza_rad
Advocate IV
Advocate IV

Can you connect to this SQL Server instance using ANY OTHER Tools? such as SSMS (SQL Server Management Studio) or something else?

This might be the case that the connection services for SQL Server are not configured properly. SQL Browser is not running, and many other reasons why the connection to SQL Server is not working.

Author, Consultant, Speaker
https://radacad.com
Anonymous
Not applicable

Hi Reza , good to see you here. Its my delight to see u taking care of my issue yourself. 

 

to answer your question: from my workstation i am able to connect via SQL Server management studio.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.