Power BI Desktop – How did I connect to Analysis Services using my Power BI Desktop Application when I was outside of the Analysis Services Domain?
I was working with a customer where I was working on my own laptop. My laptop is not part of their domain. I did have an account in their domain and when I tried to connect using Power BI Desktop, I got the following error when trying to connect as shown below.
This is not the greatest error message.
Fortunately, I knew that I could connect to the server so the issue was not with connectivity but more around how could I authenticate against Analysis Services.
NOTE: Analysis Services can only Authenticate against domain accounts, and that is why I got the error above.
Using LiveConnection outside of the SSAS Domain
Below are the steps on how I got this working.
-
I clicked on Start, then Run and typed in CMD
-
I typed in the following which I will explain below
runas /netonly /user:MyDomain\GilbertQue “C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe”
-
The only things I changed was MyDomain
- This is the Domain in which you already have an account that you can use to connect to SSAS
-
I also ensured that the Power BI Desktop executable was in the correct folder.
- I double checked by going into the folder and making sure it was there
-
I then pressed Enter
-
I was then prompted to enter the password, which I put in and pressed Enter
- I got the following prompt below and Power BI Desktop started
-
I then went about connecting to my SSAS Instance as I would do when I am inside my domain
- Get Data, Analysis Services
-
I then put in the Name or IP Address of my Analysis Services Server. I made sure that it was set to Connect live
- I then clicked Ok
-
I then found my Cube and selected it by clicking Ok
-
I could then see the tables under Fields and interact with the Analysis Services Cube to create my report.
Creating a Shortcut to start Power BI Desktop
The final step is to create a shortcut which will allow me to click on the shortcut instead of having to type in the syntax every time.
-
I went to my desktop, right clicked, selected New, then Shortcut
-
I then put in the Syntax from the step above
- I then clicked Next
-
I then gave the Shortcut a name “PBI SSAS Connection”
- And then clicked Finish to complete the Shortcut
-
Now with it my desktop I double-clicked the shortcut which opened the cmd.exe
- I put in my password
- It then opened Power BI Desktop and I was able to then connect to my Analysis Services database.
Update: 26 Aug 2019
Simon, had another great suggestion below on how to get this working. This looks like another alternative option. I do really learning from other people.
“Alternatively you can shift+right-click the Power BI icon and select Logon as user.
As an extension of this, you can use it to impersonate multiple chrome sessions for the PBI Service. This is particularly useful in my current org whose SSO *forces* the currently logged in Windows user for any app, i.e., selecting any account other than the Windows account will not work unless you do the aforementioned trick.”
Conclusion
In this blog post I have shown how I was able to connect to an Analysis Services database, where my Power BI Desktop application was not part of the same Domain.
I found this initially to be a potential issue, but by doing it this way at least I can work externally from my own laptop.
As always, any questions or suggestions are most welcome.
Thanks for reading!
Congrats for the hacking!!!
I was wondering if I would do any kind of similar solution to using my power bi desktop with multiple accounts.
for now the experience is very bad for me, I always need to delete the folder users under power bi desktop folder as egg bellow
C:\Users\”YourUser”\Microsoft\Power BI Desktop Store App\User.zip
After I delete that i have the inconvinience is to re-enter all the credentials for all datasources
Any suggestiosn so far?
Thanks very much indeed. We have a lot of users in subsidiaries who work on machines that are not in the domain of our SSAS server. Our infrastructure colleagues had always told us it was not possible for them to connect to the server even through VPN. Now they can, thanks to your hint.
No worries, glad you found it helpful and you can now access your data!
Alternatively you can shift+right-click the Power BI icon and select Logon as user.
As an extension of this, you can use it to impersonate multiple chrome sessions for the PBI Service. This is particularly useful in my current org whose SSO *forces* the currently logged in Windows user for any app, i.e., selecting any account other than the Windows account will not work unless you do the aforementioned trick.
Hi Simon, thanks for that I will update my blog post with this handy tip.
This is great. Spent a lot time trying to connect to SSAS and finally this method worked. You saved our bacon. Thanks.
That’s awesome. Thanks for letting me know
This is a great workaround. I have a question. Does it also work with laptops that are Azure AD joined with SSAS connections that are on-premise using data gateways? Since the Azure AD machines don’t know the information regarding the domain they are going to access, I am asking this question.
Hi Satya,
As far as I know when using on-prem SSAS it uses On-prem AD, so it would have to run in that context.