简体   繁体   中英

we couldn't authenticate with the credentials provided POWER BI

I have power bi 64-bit and trying to connect to SQL server. I have read-only privilege to SQL server so when I connect to it, I only provide user name and password is blank.

Now, I'm trying to connect power bi to SQL server so I go to Get Data -> SQL Server and then type in host-name: port or IP Address: port and then I choose the database tab and put the user name, no password since I didn't have any in the first place and hit connect and it gives me:

we couldn't authenticate with the credentials provided

From the sounds of it you're using Windows Auth to login to SQL and that SQL is on a remote server. I had a similar issue where I used a remote desktop where Power BI lived and needed to VPN in to my PROD env within a RD. The issue is that that Windows Auth from the Remote differs from the server SQL. Even though I used "Use Alternate Credentials" it still wasn't enough. You need to "trick" Power BI when opening that you're actually logging in with the same Windows account as the one from the SQL server.

  1. Copy and paste the code below on the server Power BI lives as a .bat file.
  2. Double check that the location provided is the same location where the .exe lives for Power BI on your machine.
  3. Run it
  4. Follow the steps. First add domain and password then after enter the password for that account.
  5. It will automatically open Power BI. Now try running the Get Data but this time use "Use my current credentials"
@echo off
set /p id="Enter domain and user name (domain\username): "
runas /noprofile /netonly /user:%id% "C:\Program Files\Microsoft Power BI Desktop RS\bin\PBIDesktop.exe"

My mistake. I was using the wrong hostname and wrong port. Once I put the right ones i was able to connect

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM