Power BI Embedded Update Datasources API to change connection between data sources
Updated: October 18, 2018
You can use the Power BI Embedded Update Datasources API to change the connection details between different data sources programmatically.
When the dataset and reports are ready to go live, change the data source connection to point to the production data source (either cloud or on-premises), regardless of the previous connection type. This helps with app life-cycle management—for example, when your dev or staging environment is on-premises but your production data source is in Azure.
Be sure to set credentials for the new data source as well, as part of updating the connection.