Refresh works on my desktop but the service says credentials not specified Power Query
Report pulls from a SharePoint folder of monthly CSVs plus a SQL view. Desktop refresh is instant. Scheduled refresh fails with a credentials error, and on the dataset settings page there is a third data source listed that I do not recognise — no server name, just a URL fragment. Gateway is installed and the SQL source shows green. Where is the third source coming from?
@pinned_versions · 7mo ago · 2 replies
That is a dynamic data source. Somewhere you have a step that builds a path or URL from a parameter, a column value, or a date, and the service cannot work out what it is going to call before it calls it, so it refuses to attach credentials.
The fix is to keep the base address literal and push the variable part into an option record:
Web.Contents("https://host/api", [RelativePath = "reports/" & period])instead ofWeb.Contents("https://host/api/reports/" & period). Same for SharePoint — hardcode the site root and navigate to the folder in later steps rather than concatenating the folder into the initial call.Reply
Report
@nadia_brill · 7mo ago
Found it — a helper query that appends the year to the SharePoint site URL so it picks the right archive folder. Rewrote it with RelativePath and the phantom source disappeared.
Reply
Report