2
votes

I have create a PBIX file in PowerBI Desktop using DirectQuery method on Azure SQL Server. After that I uploaded the file to workspace. Now when I am opening that report on my custom web app using MVC API, it is throwing me following error:

Datasource has no credentials. Please try again later or contact support and provide the following details to help resolve your issue faster.

Error CodeDMTS_DatasourceHasNoCredentialError
Server someserver.database.windows.net
Correlation ID3b3d08d7-21cd-7a4b-3778-79841050d3c4
ConnectionType {FieldValue}
Activity ID24480fac-d172-e3a6-17b6-eb8a2ce5b02c
Request IDb1ec1b45-5a65-c642-3fa0-4c5090102720
TimeFri Jun 10 2016 14:53:01 GMT+0500 (Pakistan Standard Time)
Version13.0.1500.198
Cluster URI https://wabi-south-east-asia-redirect.analysis.windows.net/
1

1 Answers

4
votes

When you import your PBIX file into your Power BI workspace collection on Azure the service does not include your credentials due to security concerns. After your import is complete you can modify the credentials and / or connection strings using our REST APIs.

Power BI REST APIs

Specifically you'll need to call the PATCH datasource API Patch Gateway Datasource API

Examples of calling these APIs via the SDKs can be found in the following:

  1. .NET Provision Tool from sample (Update Connection)
  2. Node JS Command Line tool (Update Connection)