Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
williamd
New Member

Update Connection Strings via API

I have been using the Rest API to publish PBIX files to PowerBI.com. Part of this process was setting the connection strings to the production instance. I struggled with the documentation, as we are using an on-premise data source with the enterprise gateway.

 

I spent many hours troubleshooting why i was getting an error 

1 ACCEPTED SOLUTION
williamd
New Member

I have been using the Rest API to publish PBIX files to PowerBI.com. Part of this process was setting the connection strings to the production instance. The documentation doesnt say much around using an on-premise data source with the enterprise gateway.

 

I spent many hours troubleshooting why i was getting this error

 

 powerbi issue.png

 

 

 The example connectionstring that is used is this:

"data source=MyAzureDB.database.windows.net;initial catalog= Sample2;persist security info=True;encrypt=True;trustservercertificate=False"

 

I couldnt get that to work, i got it to work using the following format:

 

"data source=mylocaldbinstance;initial catalog=localdb;persist security info=False" .

 

Hopefully this helps others who get stuck on this.

View solution in original post

4 REPLIES 4
williamd
New Member

I have been using the Rest API to publish PBIX files to PowerBI.com. Part of this process was setting the connection strings to the production instance. The documentation doesnt say much around using an on-premise data source with the enterprise gateway.

 

I spent many hours troubleshooting why i was getting this error

 

 powerbi issue.png

 

 

 The example connectionstring that is used is this:

"data source=MyAzureDB.database.windows.net;initial catalog= Sample2;persist security info=True;encrypt=True;trustservercertificate=False"

 

I couldnt get that to work, i got it to work using the following format:

 

"data source=mylocaldbinstance;initial catalog=localdb;persist security info=False" .

 

Hopefully this helps others who get stuck on this.


@williamd wrote:

I have been using the Rest API to publish PBIX files to PowerBI.com. Part of this process was setting the connection strings to the production instance. The documentation doesnt say much around using an on-premise data source with the enterprise gateway.

 

I spent many hours troubleshooting why i was getting this error

 

 powerbi issue.png

 

 

 The example connectionstring that is used is this:

"data source=MyAzureDB.database.windows.net;initial catalog= Sample2;persist security info=True;encrypt=True;trustservercertificate=False"

 

I couldnt get that to work, i got it to work using the following format:

 

"data source=mylocaldbinstance;initial catalog=localdb;persist security info=False" .

 

Hopefully this helps others who get stuck on this.


Great to hear you could finally get this to work, was the API Set All Connections called in your case?

Hi,

 

I am trying the similar thing. Using Import API I have imported set of PBIX files to PBI Service. Now I would need to update the connection string for all the imported ones. Connection string varies for different App workspace. 

williamd
New Member

I have been using the Rest API to publish PBIX files to PowerBI.com. Part of this process was setting the connection strings to the production instance. I struggled with the documentation, as we are using an on-premise data source with the enterprise gateway.

 

I spent many hours troubleshooting why i was getting this error, after following the apery sample:

 

 powerbi issue.png

 

 

 

"data source=MyAzureDB.database.windows.net;initial catalog= Sample2;persist security info=True;encrypt=True;trustservercertificate=False"

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.