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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am using Power BI Desktop to source data from a database I have in the cloud. This works perfectly and refreshes on command. I then publish it to the Power BI Service. However, when I open the Power BI Service and ask to refresh the dataset it will not refresh. I get the following error: "Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again." I have checked that the credentials I am using on Power BI Desktop and Power BI Service are the same. I have posted below the address of the database including the token. Please feel free to try it and see if you get the same problem as me. If you can help me fix this problem it would be greatly appreciated.
Data Source:
https://sdata-9f58.restdb.io/rest/sensorkey
x-apikey: beb561ce267e0bd24b1f22dbeac7eaab3b732Thanks,
Luke
Solved! Go to Solution.
Hi @LukeM ,
After a few test, I found you can use RelativePath option paramter to workacross this issue.
Full query:
let
Source = Json.Document(Web.Contents("https://sdata-9f58.restdb.io", [Headers=[#"x-apikey"="beb561ce267e0bd24b1f22dbeac7eaab3b732"],RelativePath="/rest/sensor"])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"_id", "data"}, {"_id", "data"})
in
#"Expanded Column1"
When you update data source credentials in power bi service, it will try to enable anonymous authorization mode on 'root path' instead full url.
Regards,
Xiaoxin Sheng
Hi @LukeM ,
After a few test, I found you can use RelativePath option paramter to workacross this issue.
Full query:
let
Source = Json.Document(Web.Contents("https://sdata-9f58.restdb.io", [Headers=[#"x-apikey"="beb561ce267e0bd24b1f22dbeac7eaab3b732"],RelativePath="/rest/sensor"])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"_id", "data"}, {"_id", "data"})
in
#"Expanded Column1"
When you update data source credentials in power bi service, it will try to enable anonymous authorization mode on 'root path' instead full url.
Regards,
Xiaoxin Sheng
Hi Xiaoxin ,
Thanks for your help with this. I used the query code you provided and it works fine in Power BI Desktop but when published to the Service it still fails to refresh. Given this persistent problem I have decided not to use Power BI.
Thanks,
Luke
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!