2
votes

Just installed Power BI Data Gateway on one of the companies servers.

The processes was smooth and very easy, I have assigned a name to the Data Gateway.

As it is linked to my email (I think this is going to be another problem when other employees trying to publish their reports), when I tried to configure datasource in my Gateway I get this error !

Unable to connect: We encountered an error while trying to connect to . Details: ""

Activity ID: 951737c3-eea2-43c3-b5d4-7bb03e247e5b

Request ID: b7c69cff-2be9-f965-2586-14b978802dd7

Cluster URI: https://wabi-australia-southeast-redirect.analysis.windows.net

Status code: 400

Error Code: DMTS_UpdateClusterDatasourceCredentialsErrorCode

Time: Mon Sep 02 2019 10:15:31 GMT+1000 (AUS Eastern Standard Time)

Version: 13.0.10599.151

PBIGateway: The on-premises data gateway's service account failed to impersonate the user.

I am sure that my user ID and password are both correct, not sure why it is not working!!

2
Are you sure the power bi user and the user you specified while installing the gateway on-premise are same?Pratik Bhavsar
@PratikBhavsar Yesasmgx

2 Answers

1
votes

This one had me stumped for days. Why would the PBI desktop app allow connections, seamlessly on your desktop and yet when you publish a report to the web, bong-bong no authentication, no credentials, nothing! It was very frustrating, and no specific details other than a plethora of connection IDs which mean nothing.

In the end, we found the problem was between how we've set up the Power BI Gateway on-prem, and whether the gateway service account on the gateway had the permissions to access our data sources, both from SQL Server on-prem and an Excel table in Sharepoint.

When setting up your Gateway (not a personal GW, but a server side one), we've created the gateway using the Admin local account. That was our first mistake. We couldn't connect to any of our SQL Server databases, from Sharepoint. So we've re-installed it using an Admin O365 AD account. Our SQL Server access was ok, but anything in Sharepoint wouldn't work - even though the same account was used to put Excel files and CSV files into Sharepoint.

We then noticed that the gateway was defaulted to a service account under the NT Authority group. Again, another local account. Changed that to another O365 account, but again - nothing would allow us to connect to the Excel sharepoint file! How hard can this be, when the Excel file connected fine inside PowerBI desktop! It was very frustrating.

So we've re-installed the on-prem gateway again, but this time used one AD account for it's sign on, and another system AD account for it's service account. We also publish the PBI report to the cloud, but the dataset would be failing to connect to the Excel file in Sharepoint. WHY!!!???

It came to that User tab and putting our on-prem gateway service account in the User list of the connector to the Sharepoint file.

VOILA!! It worked.

In summary:

  • Create your PBI reports in desktop and point everything you need to what ever you need in the Get Data wizards
  • If you're referring to an Excel file, DO NOT point to a local / network Excel file. You're wasting your time.
  • Put the Excel/CSV or whatever in sharepoint in a Documents folder somewhere
  • Click Manage Permissions on the file and add the On-Prem service gateway to the list
  • Next, open the Excel file on the web
  • And go ahead and open it in your local desktop Excel as well
  • Go to FILE --> INFO
  • Click Copy Location to store the location of the file in the clipboard. Save this string in notepad
  • Close Excel on-prem
  • Close Excel online
  • Go to your PBI report and edit the M-Code via the Advanced Editor of your data source
  • Replace the C drive location of your Excel filepath with the one copied into your notepad
  • Now your query is pointing to the Excel file in sharepoint.
  • Publish your report
  • Go to app.powerbi.com and go to your report's dataset
  • Click the three dots and go to Settings
  • Go to Gateway Cluster and lick Manage Gateway link
  • Open up your gateway cluster and go to your Excel data connector
  • Select it and click the Users tab
  • Add your on-prem gateway service account again to this list
  • Save
  • Refresh your dataset

Voila! No more errors.

I hope this lengthy answer has been enough for your to realise [1] microsoft write great software, but crappy user-experience with it and [2] you need to pass on the credentials of the gateway to any datasource that uses it, in reference to any datasource that require a gateway between on-prem and cloud reports.

0
votes

We have same problem in powerbi gateway. Turns out the database password is expired. After reset password. Problem solved.