Forum Discussion
Mahee
1 year agoRegular Visitor
Power BI to Azure SQL MI Connection via Power Query Parameters
Hi All, Good Day! We have a Power Query parameter for Server (Azure SQL MI) and Database. Once we create and try to save it with credentials, It is throwing an error. But the same server and D...
- 1 year ago
Hello Mahee ,
Power BI does not allow credentials to be saved for dynamic data source references (i.e., server/database coming from parameters), unless you're using an on-prem gateway. This is why it works for on-prem SQL (via Gateway) but not for Azure SQL MI without one.When you use Power Query parameters directly in your SQL Server connector like this:
Sql.Database(ServerParam, DatabaseParam)Power BI considers this a "dynamic data source", and dynamic data sources prevent credential storage or scheduled refresh in many cases.
Limitation: Power BI cannot associate credentials with a dynamic value for server/database unless it's marked as a gateway allowed data source with fixed metadata.To avoid dynamic binding issues:Instead of:
Sql.Database(ServerParam, DatabaseParam)Use:
let
Source = Sql.Database("your-server.database.windows.net", "your-db-name")
in
SourceThen use parameters only within queries (e.g., for schema/table filtering), not for the source connection string.
If this solved your issue, please mark it as the accepted solution. ✅
v-sgandrathi
1 year agoCommunity Support
Hi Mahee,
Just checking in -- have you had a chance to review and try the provided solution? Kindly share the status whenever you get a chance.
Looking forward to your response
Thank you.
v-sgandrathi
1 year agoCommunity Support
Hi Mahee,
.Just a quick check-in! Has your issue been resolved with the information we shared? We’d be delighted to help further if needed.
Thank you.