Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LukeM
Regular Visitor

Refresh not working in Power BI Service

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/sensor

key

x-apikey: beb561ce267e0bd24b1f22dbeac7eaab3b732

 Thanks,

Luke

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

11.png

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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.

11.png

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

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors