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
wei
Frequent Visitor

Error on updating dataset connection after importing a report to power bi embedded with CLI

I received an error when I use PowerBI Cli nodejs package tool to update the connection credentials after importing a report.

See the log below  and please hlep:

 

[ powerbi ] Found dataset!
[ powerbi ] Id: xxxxxxxxxxxxxxxx
[ powerbi ] Name: xxxxxx
[ powerbi ] Updating connection string...
[ powerbi ] Getting gateway datasources...
[ powerbi ] Connection string is not valid
[ powerbi ] Method:  POST
[ powerbi ] Url:  https://api.powerbi.com/v1.0/collections/xxxx/workspaces/%20xxxxx/datasets/xxxxxxxxxxxxxx/Default.SetAllConnections
[ powerbi ] Status Code:  400
[ powerbi ] cache-control :  no-store, must-revalidate, no-cache
[ powerbi ] transfer-encoding :  chunked
[ powerbi ] content-type :  application/json; charset=utf-8
[ powerbi ] server :  Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
[ powerbi ] strict-transport-security :  max-age=31536000; includeSubDomains
[ powerbi ] x-frame-options :  deny
[ powerbi ] x-content-type-options :  nosniff
[ powerbi ] requestid :  e36a4e65-13bb-4518-92e3-04dfe58c39e6
[ powerbi ] date :  Mon, 22 May 2017 06:01:28 GMT
[ powerbi ] connection :  close
[ powerbi ] Connection string successfully updated
[ powerbi ] Dataset:  xxxxxxxxxxxx
[ powerbi ] ConnectionString:  Server=tcp:xxxxx.database.windows.net,1433;Database=xxxx;User ID=xxxxxxxxx;Password=xx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;
[ powerbi ] {"error":{"code":"DMTS_MonikerNotFoundError","pbi.error":{"code":"DMTS_MonikerNotFoundError","parameters":{},"details":[]}}}
[ powerbi ] Method:  GET
[ powerbi ] Url:  https://api.powerbi.com/v1.0/collections/xxxxxx/workspaces/%20xxxxxxxxx/datasets/xxxxxx/Default.GetBoundGatewayDatasources
[ powerbi ] Status Code:  404
[ powerbi ] cache-control :  no-store, must-revalidate, no-cache
[ powerbi ] transfer-encoding :  chunked
[ powerbi ] content-type :  application/json; charset=utf-8
[ powerbi ] server :  Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
[ powerbi ] strict-transport-security :  max-age=31536000; includeSubDomains
[ powerbi ] x-frame-options :  deny
[ powerbi ] x-content-type-options :  nosniff
[ powerbi ] requestid :  f5774f86-6569-4fe1-8aaf-f0954ff669d4
[ powerbi ] date :  Mon, 22 May 2017 06:01:28 GMT
[ powerbi ] connection :  close
1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@wei wrote:

I received an error when I use PowerBI Cli nodejs package tool to update the connection credentials after importing a report.

See the log below  and please hlep:

 

[ powerbi ] Found dataset!
[ powerbi ] Id: xxxxxxxxxxxxxxxx
[ powerbi ] Name: xxxxxx
[ powerbi ] Updating connection string...
[ powerbi ] Getting gateway datasources...
[ powerbi ] Connection string is not valid
[ powerbi ] Method:  POST
[ powerbi ] Url:  https://api.powerbi.com/v1.0/collections/xxxx/workspaces/%20xxxxx/datasets/xxxxxxxxxxxxxx/Default.SetAllConnections
[ powerbi ] Status Code:  400
[ powerbi ] cache-control :  no-store, must-revalidate, no-cache
[ powerbi ] transfer-encoding :  chunked
[ powerbi ] content-type :  application/json; charset=utf-8
[ powerbi ] server :  Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
[ powerbi ] strict-transport-security :  max-age=31536000; includeSubDomains
[ powerbi ] x-frame-options :  deny
[ powerbi ] x-content-type-options :  nosniff
[ powerbi ] requestid :  e36a4e65-13bb-4518-92e3-04dfe58c39e6
[ powerbi ] date :  Mon, 22 May 2017 06:01:28 GMT
[ powerbi ] connection :  close
[ powerbi ] Connection string successfully updated
[ powerbi ] Dataset:  xxxxxxxxxxxx
[ powerbi ] ConnectionString:  Server=tcp:xxxxx.database.windows.net,1433;Database=xxxx;User ID=xxxxxxxxx;Password=xx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;
[ powerbi ] {"error":{"code":"DMTS_MonikerNotFoundError","pbi.error":{"code":"DMTS_MonikerNotFoundError","parameters":{},"details":[]}}}
[ powerbi ] Method:  GET
[ powerbi ] Url:  https://api.powerbi.com/v1.0/collections/xxxxxx/workspaces/%20xxxxxxxxx/datasets/xxxxxx/Default.GetBoundGatewayDatasources
[ powerbi ] Status Code:  404
[ powerbi ] cache-control :  no-store, must-revalidate, no-cache
[ powerbi ] transfer-encoding :  chunked
[ powerbi ] content-type :  application/json; charset=utf-8
[ powerbi ] server :  Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
[ powerbi ] strict-transport-security :  max-age=31536000; includeSubDomains
[ powerbi ] x-frame-options :  deny
[ powerbi ] x-content-type-options :  nosniff
[ powerbi ] requestid :  f5774f86-6569-4fe1-8aaf-f0954ff669d4
[ powerbi ] date :  Mon, 22 May 2017 06:01:28 GMT
[ powerbi ] connection :  close

@wei

The API SetAllConnections is currently working based on my test. The error in your case is intuitive, a valid connection string is like

data source=xxxx.database.windows.net;initial catalog=xxxxxdbname;persist security info=True;User id = userxxx;Password = Password01!;encrypt=True;trustservercertificate=False

 

View solution in original post

2 REPLIES 2
devbv
Frequent Visitor

Hi, I am facing a similar issue with the DMTS_MonikerNotFoundError code being thrown. However, I was wondering where you get the log as in your post please?

Eric_Zhang
Employee
Employee


@wei wrote:

I received an error when I use PowerBI Cli nodejs package tool to update the connection credentials after importing a report.

See the log below  and please hlep:

 

[ powerbi ] Found dataset!
[ powerbi ] Id: xxxxxxxxxxxxxxxx
[ powerbi ] Name: xxxxxx
[ powerbi ] Updating connection string...
[ powerbi ] Getting gateway datasources...
[ powerbi ] Connection string is not valid
[ powerbi ] Method:  POST
[ powerbi ] Url:  https://api.powerbi.com/v1.0/collections/xxxx/workspaces/%20xxxxx/datasets/xxxxxxxxxxxxxx/Default.SetAllConnections
[ powerbi ] Status Code:  400
[ powerbi ] cache-control :  no-store, must-revalidate, no-cache
[ powerbi ] transfer-encoding :  chunked
[ powerbi ] content-type :  application/json; charset=utf-8
[ powerbi ] server :  Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
[ powerbi ] strict-transport-security :  max-age=31536000; includeSubDomains
[ powerbi ] x-frame-options :  deny
[ powerbi ] x-content-type-options :  nosniff
[ powerbi ] requestid :  e36a4e65-13bb-4518-92e3-04dfe58c39e6
[ powerbi ] date :  Mon, 22 May 2017 06:01:28 GMT
[ powerbi ] connection :  close
[ powerbi ] Connection string successfully updated
[ powerbi ] Dataset:  xxxxxxxxxxxx
[ powerbi ] ConnectionString:  Server=tcp:xxxxx.database.windows.net,1433;Database=xxxx;User ID=xxxxxxxxx;Password=xx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;
[ powerbi ] {"error":{"code":"DMTS_MonikerNotFoundError","pbi.error":{"code":"DMTS_MonikerNotFoundError","parameters":{},"details":[]}}}
[ powerbi ] Method:  GET
[ powerbi ] Url:  https://api.powerbi.com/v1.0/collections/xxxxxx/workspaces/%20xxxxxxxxx/datasets/xxxxxx/Default.GetBoundGatewayDatasources
[ powerbi ] Status Code:  404
[ powerbi ] cache-control :  no-store, must-revalidate, no-cache
[ powerbi ] transfer-encoding :  chunked
[ powerbi ] content-type :  application/json; charset=utf-8
[ powerbi ] server :  Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
[ powerbi ] strict-transport-security :  max-age=31536000; includeSubDomains
[ powerbi ] x-frame-options :  deny
[ powerbi ] x-content-type-options :  nosniff
[ powerbi ] requestid :  f5774f86-6569-4fe1-8aaf-f0954ff669d4
[ powerbi ] date :  Mon, 22 May 2017 06:01:28 GMT
[ powerbi ] connection :  close

@wei

The API SetAllConnections is currently working based on my test. The error in your case is intuitive, a valid connection string is like

data source=xxxx.database.windows.net;initial catalog=xxxxxdbname;persist security info=True;User id = userxxx;Password = Password01!;encrypt=True;trustservercertificate=False

 

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.