Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I've deployed a new on-premises data gateway for a client via a pipeline.
Ideally, I'd like to migrate the connectors manually created on the old gateway to the new data gateway.
I've already created a service princeple via a pipeline, which I've given API rights to on app.powerbi.com Admin settings.
Now, I can connect to api.powerbi.com using PowerShell and the secret with service princeple.
I haven't quite managed to get this working yet, so I'm wondering if anyone here has an example I can use to automatically create connectors via a pipeline?
Solved! Go to Solution.
HI @aheukels
It will help update a data source credentials for on premises data gateway, but There is no built-in support to import or deploy gateway connectors directly from a JSON file.
we recommend submitting this requirement to the Ideas forum: Ideas - Microsoft Fabric Community where the product team can review it and track customer demand for potential future enhancements.
Thank you for your understanding.
Hi CST,
Thanks for the answer. Perhaps this example will help to create a connector via a pipeline PowerBI-Developer-Samples/PowerShell Scripts/CreateDatasource.ps1 at master · microsoft/PowerBI-Deve.... It would be great if this were possible based on a JSON with connectors, instead of having to create them manually. It would also be nice if the secret were rotated when using a service prince.
Kind Regards,
Arie Heukels
HI @aheukels
It will help update a data source credentials for on premises data gateway, but There is no built-in support to import or deploy gateway connectors directly from a JSON file.
we recommend submitting this requirement to the Ideas forum: Ideas - Microsoft Fabric Community where the product team can review it and track customer demand for potential future enhancements.
Thank you for your understanding.
Hi @aheukels
Thank you for reaching out to the Microsoft Fabric Forum Community.
While the Power BI REST API allows you to list gateways and their data sources, bind datasets to gateways, and update credentials, it does not provide a supported way to export, clone, or migrate existing gateway connectors from one gateway to another.
If you would like to Create a new data source on the specified on-premises gateway, you can use this API
Gateways - Create Datasource - REST API (Power BI Power BI REST APIs) | Microsoft Learn
but Virtual network (VNet) and Cloud gateways aren't supported.
Additionally, these are all the API’s with which you can work with gateways, Please go through them and check if anyone of them suits your desired workaround.
Gateways - REST API (Power BI Power BI REST APIs) | Microsoft Learn
If there are any deviations from your expectation please let us know we are happy to address.
Thanks.