Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
On Power BI Desktop I am connecting to a REST API that exposes company data requried for reporting. The API expects a bearer token for authentication. I have used the following approach to generate the bearer token and then inject it into the API call to retrieve data. This works fine on Power BI desktop but fails after publishing to Power BI Service. While this works on Power BI desktop I am wondering if this is a limitation to Power BI Service and if this is the best approach.
I am using a FROM WEB data source with anonymous credentials since the bearer token is being injected into the M Query at runtime. When I publish to Power BI Service and attempt to manually refresh the data or schedule a data refresh, I receive the following error.
Scheduled refresh is disabled because at least one data source is missing credentials.
Is this a limitation of Power BI Service or is there a better approach for retrieving data from a REST API that requires authentication via JWT?
I've taken the M code from the generic query and moved it into a separate report that only displays the bearer token result. Refreshing the data in Power BI desktop works as expected with a new bearer token being displayed. Publishing to Power BI Service and attempting to refresh the data returns an error and does not display a new bearer token. Oddly, the error references a scheduled refresh but I am doing a manual refresh on the model. "Scheduled refresh is disabled because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources. Then reactivate scheduled refresh." I am starting to think this is a use case that is not supported by Power BI Service. Seems odd as this is a pretty standard way to surface corporate data without direct access to databases.
Hi @pradvisors
What I would suggest doing is to put the function with your actual M code into a single table and see if that works?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.