Power BI Unsupported Data Source for Refresh - How to Fix It
You build a report in Power BI Desktop. It works. Refresh in Desktop works. You publish it to the service, go to set up scheduled refresh, and get a message telling you that you can't schedule refresh for this semantic model because one or more sources currently don't support refresh.
No details on which source. No suggested fix. Just a greyed-out toggle and a business user asking why their dashboard is showing last Tuesday's numbers.
This is one of the most common Power BI support calls we get from Australian clients, and it's almost always one of a handful of causes. Here's how we track it down and fix it.
What the error actually means
Power BI Desktop and the Power BI service are not the same runtime. Desktop runs Power Query on your machine, with your credentials, your network access and whatever connectors you've installed. The service runs refresh in Microsoft's cloud (or through an on-premises data gateway), and before it'll even let you schedule a refresh, it inspects your queries and works out which data sources they hit.
If the service can't statically identify a data source, or if it identifies one it doesn't know how to refresh, it blocks scheduled refresh entirely. Desktop doesn't do this check, which is why the problem only shows up after publishing.
Step one - find out which source is the problem
Start in Power BI Desktop, not the service.
- Open the .pbix file
- Go to File > Options and settings > Data source settings
- Look at the list of data sources under "Data sources in current file"
Compare that list against what Power BI's documentation says is supported for refresh in the service. Anything unusual stands out quickly: a custom connector, a local file path, an odd web URL.
Then in the service, open the semantic model settings and look at the Data source credentials and Gateway and cloud connections sections. Sources that the service couldn't work out sometimes show up with a warning, or not at all, which is itself a clue.
If that doesn't point to the problem, open the Advanced Editor for each query in Power Query and read the M code. Yes, it's tedious. It's also usually where the answer is.
Cause 1 - dynamic data sources
This is the big one. In our experience, the majority of "unsupported data source" errors come from dynamic data sources.
A dynamic data source is one where the connection string or URL is built at runtime from other values. The classic example is a Web.Contents call where the URL is concatenated from a parameter or a column value:
Web.Contents("https://api.example.com/customers/" & [CustomerId] & "/orders")
Desktop runs this happily. The service can't, because it doesn't know in advance what URL it'll be hitting, so it can't check credentials or privacy levels for it.
The fix is to keep the base URL static and move the variable parts into the RelativePath and Query options:
Web.Contents(
"https://api.example.com",
[
RelativePath = "customers/" & [CustomerId] & "/orders",
Query = [pageSize = "500"]
]
)
Now the service sees https://api.example.com as the data source, you set credentials for it once, and refresh works. This one change has fixed the problem for us more times than I can count.
The same principle applies to other connectors. If you're building a SQL server name from a parameter that's computed from another query, the service may not be able to resolve it. Simple parameters (defined in Manage Parameters, holding a literal value) are generally fine. Parameters calculated from other queries usually aren't.
A pattern to watch for: developers who've built a "config" table in Excel or SharePoint that holds server names or API URLs, then reference it in every query. It feels like good practice. It breaks scheduled refresh.
Cause 2 - custom connectors without a gateway
If someone has installed a custom connector (a .mez or .pqx file) in Desktop, the service won't be able to refresh it directly. Custom connectors need an on-premises data gateway in standard mode, with the connector file placed in the gateway's custom connectors folder and the gateway configured to load it.
We see this a lot with niche SaaS platforms where a vendor has supplied their own Power BI connector. It works in Desktop on the analyst's laptop, and nobody thought about the gateway until publish day.
Personal mode gateways don't support custom connectors in the same way, so if you're relying on one, that's another thing to check. For anything going into production, we recommend a standard mode gateway on a properly managed server, not on someone's desktop.
Cause 3 - sources that need a gateway but don't have one
Some sources simply can't be reached from the cloud: on-premises SQL Server, file shares, local Excel files, Oracle databases behind the firewall. These need a gateway, and the semantic model has to be mapped to a gateway data source that matches the connection details exactly.
"Exactly" is the important word. If your query connects to SQLPROD01 and the gateway data source is configured for sqlprod01.corp.local, the service treats them as different sources. Server names, database names and file paths all need to match character for character. We've spent more hours than I'd like to admit tracking down a mismatch between a short server name and a fully qualified one.
Cause 4 - a mix of cloud and on-premises sources
When a single semantic model pulls from both cloud sources (say, a SharePoint Online list) and on-premises sources (a local SQL database), refresh needs a gateway that can handle both. In the gateway settings, there's an option to allow user cloud data sources to refresh through the gateway cluster. If that's off, the cloud source won't map, and the model can't refresh.
This one is easy to miss because each source works fine on its own.
Cause 5 - genuinely unsupported sources
Occasionally the answer is just that the source isn't supported for refresh in the service. Some connectors are Desktop-only, some are in preview with limited service support, and some combinations of authentication method and connector aren't available in the cloud.
When that's the case, your options are:
- Move the data somewhere supported first, for example land it in a Fabric lakehouse or Azure SQL using a pipeline or dataflow
- Use a Dataflow Gen2 to do the extraction, then point the semantic model at the dataflow output
- Run refresh through a gateway, where the connector may be supported even if it isn't in the cloud
Honestly, the first option is often the right long-term answer anyway. If a report depends on a fragile, unusual connector, putting a proper data layer underneath it pays off quickly. This is a big part of the work we do on Microsoft Fabric projects: moving reports off direct connections to odd sources and onto a managed data platform.
A troubleshooting checklist
When a client sends us this error, here's roughly the order we go through:
- List every data source in Desktop's Data source settings
- Search the M code for
&inside connector calls (a strong sign of dynamic sources) - Check every Web.Contents call uses
RelativePathandQueryfor the variable parts - Look for custom connectors and confirm the gateway has them installed
- Compare server and database names between the queries and gateway data sources, character for character
- Check whether the gateway allows cloud data sources if the model mixes both
- Confirm the connector is supported for refresh in the service at all
Nine times out of ten, we've found it by step 3.
Prevention beats troubleshooting
The frustrating part about this error is that it shows up at the worst possible moment: after the report has been built, demoed and promised to the business. A few habits stop it happening:
- Publish early. Push a rough version of the report to a dev workspace and set up refresh on day one. You'll find refresh problems while the M code is still small and easy to change.
- Have a standard pattern for APIs. If your team builds a lot of REST API reports, write a shared function that always uses
RelativePathandQuery. Make it the default. - Avoid computed connection strings. Use literal parameters for environment switching (dev, test, prod), not values looked up from another query.
- Treat gateways as infrastructure. Clustered, monitored, on supported servers, with an owner. Not a box under someone's desk.
My take
The error message is unhelpful, and I'd love Microsoft to tell you which source is the problem rather than leaving you to hunt for it. But the underlying behaviour makes sense. The service needs to know what it's connecting to before it can safely store credentials and run unattended refresh.
Once you understand that, the fixes are mostly straightforward. Static base URLs, matching gateway data sources, and a proper data layer for anything exotic.
If your organisation has a backlog of reports that won't refresh, or you want help setting up Power BI so these problems don't keep recurring, our Power BI consultants do this work every week. We also help teams build out the broader business intelligence setup behind their reporting.
Reference: Troubleshoot an unsupported data source for refresh - Microsoft Learn