My SQL server configured with Windows authentication. All works fine if I connect to my server in PowerBI desktop using my computer. But how do I connect using a different computer which is on a different domain using my Windows credentials?
Solved! Go to Solution.
Hi @Anonymous,
Firstly, please ensure that you are able to ping the target server from the machine that is running Power BI Desktop, and please follow the steps in this similar blog to configure SQL Server to allow remote connections. Also ensure that you have added the user of different domain in SQL Server.
Secondly, have you established a trust relationship between the two different domains? If yes, you are able to connect to SQL Server using Windows Authentication from Power BI Desktop, and there are no extra steps you need to take comparing to that you connect to SQL Server in Power BI desktop using your computer.
However, if there is no trust relationship between the two domains. You can use runas /netonly command to achieve your requirement.
1. Open command prompt and run the following command, enter the password of domain user when prompted.
runas /netonly /user: Domain\username "C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe"
2. Create a saved windows credential for the SQL Server you want to connect to.
For more details, please check the following similar blogs.
Connect to SQL Servers in another domain using Windows Authentication
Pretend You’re On The Domain With Runas /NetOnly
Thanks,
Lydia Zhang
Hi @Anonymous,
Firstly, please ensure that you are able to ping the target server from the machine that is running Power BI Desktop, and please follow the steps in this similar blog to configure SQL Server to allow remote connections. Also ensure that you have added the user of different domain in SQL Server.
Secondly, have you established a trust relationship between the two different domains? If yes, you are able to connect to SQL Server using Windows Authentication from Power BI Desktop, and there are no extra steps you need to take comparing to that you connect to SQL Server in Power BI desktop using your computer.
However, if there is no trust relationship between the two domains. You can use runas /netonly command to achieve your requirement.
1. Open command prompt and run the following command, enter the password of domain user when prompted.
runas /netonly /user: Domain\username "C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe"
2. Create a saved windows credential for the SQL Server you want to connect to.
For more details, please check the following similar blogs.
Connect to SQL Servers in another domain using Windows Authentication
Pretend You’re On The Domain With Runas /NetOnly
Thanks,
Lydia Zhang
I managed to the RUNAS, works fine. I configured a connection using Windows authenthication => use my current credentials (credentials specified in RUNAS). Refresh works well in Desktop.
But about point 2:
@v-yuezhe-msft wrote:2. Create a saved windows credential for the SQL Server you want to connect to.
What do you mean by "create a saved windows credential"?? How would I do that?
When I publish this report to PBI service and try to refresh, I still get error:
So seems I am missing something. Anyone else managed to get this working?
Thanks in advance,
Grzegorz
Anyone know how to do this using the Power BI Desktop app installed through the Microsoft Store rather than the application installed directly? I'm not having any luck with a command like this:
runas /netonly /user:domain\user.name "C:\Program Files\WindowsApps\Microsoft.MicrosoftPowerBIDesktop_2.57.5072.0_x64__8wekyb3d8bbwe\bin\PBIDesktop.exe"
The command executes but Power BI never launches. I can't even launch manually using the EXEf file in the folder above, so I think it has something to do with permissions for trusted apps.