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 am managing well over a hundred PowerBI reports and need to add a data source to all the corresponding datasets. The new data source is an azure sql db with basic auth. I have attempted to do this via the power bi rest api in several different ways, unsuccessfully.
According to the documentation, there doesn't seem to be an endpoint for simply adding / posting new data sources.
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets
I have tried the PS scripts linked to in the documentation:
https://github.com/microsoft/PowerBI-Developer-Samples/blob/master/PowerShell%20Scripts/CreateDataso...
Please explain which api endpoint is the right one to use.
Cheers, Mike
Solved! Go to Solution.
That script is for gateway data sources, not semantic model data sources.
Usually I would have said "use an app template" but in your situation that won't help.
Generally, Power Query is allergic to the idea of dynamically adding data sources. Your only option at the moment is to do this manually. Thankfully you can copy/paste queries across Power Query editors.
That script is for gateway data sources, not semantic model data sources.
Usually I would have said "use an app template" but in your situation that won't help.
Generally, Power Query is allergic to the idea of dynamically adding data sources. Your only option at the moment is to do this manually. Thankfully you can copy/paste queries across Power Query editors.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |