none
The target principal name is incorrect. Cannot generate SSPI context. RRS feed

  • Question

  • Hi,

    I am having problems with creating a query on a SQL database source. I need to use database authentication, since I am not logged on to the domain. When I start SQL Server management studio I am able to logon to the database.

    According to Microsoft it is possible to use db authentication in Excel: after entering the server and optional database name, you should press [OK] and then you can choose the authentication method.

    However when I press [OK], Excel shows me "The target principal name is incorrect.  Cannot generate SSPI context." So it looks like you can only use a database login once you are logged in to the domain.

    Is there something I am overlooking or is it impossible to use DB login in Power Query?

    Thanks!


    Thursday, July 14, 2016 10:45 AM

Answers

  • It sounds like you might already have incorrect saved credentials for this data source. Go into the Data Source Settings dialog (on the "Power Query" ribbon if in Excel 2013, in the menu under "New Query" on the "Data" tab if in Excel 2016. Look for your server name there, select it and click "Edit". Then click "Edit" under Credentials and switch from Windows to Database.
    Thursday, July 14, 2016 2:37 PM

All replies

  • It sounds like you might already have incorrect saved credentials for this data source. Go into the Data Source Settings dialog (on the "Power Query" ribbon if in Excel 2013, in the menu under "New Query" on the "Data" tab if in Excel 2016. Look for your server name there, select it and click "Edit". Then click "Edit" under Credentials and switch from Windows to Database.
    Thursday, July 14, 2016 2:37 PM
  • Hi Kurt,

    That did the trick. Thanks for your fast reply!

    Best regards

    Thursday, July 14, 2016 6:58 PM
  • I ran into the same issue when connected to a VPN.  I ended up having to use a runas command to launch Power BI Desktop, using my domain credentials.  This corrected it.  I would have thought that logging into application with the proper credentials would be enough, but it wasn't. 

    1) Open a command line window (search for "cmd")

    2) Enter the following:  runas /netonly /user:<DOMAIN/USER_NAME> "C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe" (Put in your domain\user and the path to the PBIDesktop.exe executable)

    3) When prompted, enter your domain password

    Power BI Desktop will launch.  This took care of my issue.  Hope it works for you if you're logging into a remote domain via VPN. 

    Friday, May 12, 2017 3:31 PM