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:
"data source=MyAzureDB.database.windows.net;initial catalog= Sample2;persist security info=True;encrypt=True;trustservercertificate=False"