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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

SQL log in is failing when getting data from view

Hi,

I am trying to get data from a SQL view, through a blank query:

 

let
Input = Sql.Database("[server]",
"[database]",
[Query="EXEC dbo.View @StartDate='2018-03-01'"])
in
Input

 

Now Power BI asks me to fill in my credentials. But then I get the message that my credentials are not valid ("we couldn't authenticate..."), although I am 100% sure the credentials are correct (I use them all the time to import data from SQL into Power BI).

 

The server is only reachable through a VPN. Could that be a problem? 

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@Anonymous,

Do you select data from a view or execute a stored procedure? If you import data from SQL  view, the T-SQL should like "Select * from dbo.View". 

Are you able to connect to the SQL Server from SSMS and do you get expected result when you use the "EXEC dbo.View @StartDate='2018-03-01'  statement in SSMS? Please make sure that SSMS is installed in the same machine as Power BI Desktop.

We also need to know which authentication type you use in Power BI Desktop. If you use a Windows login to connect to SQL, please make sure you choose Windows authentication type, if you use a SQL login, choose database authentication type.

Regards,
Lydia

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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