Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone,
I'm working on a Power BI report that pulls data from a CSV file hosted on SharePoint. The file is accessed using the Web.Contents() method in Power Query.
The report is published using “Publish to Web”, and the dashboard is embedded on a public-facing website. It has been working fine until recently — visuals still load, but now the dataset refresh in Power BI Service fails with the following error:
Failed to update data source credentials: The credentials provided for the Web source are invalid.
(Source at https://.../_api/contextinfo)
No other changes have been made, except that the file was recently moved to a different folder within SharePoint (same site). The CSV is still stored inside a private SharePoint document library and is not publicly shared.
I understand that Web.Contents() works only if the data source is publicly accessible.
My questions are:
Thanks in advance for your guidance!
Solved! Go to Solution.
Hi @snig2018narayan ,
Thank you for reaching out to us Microsoft Fabric Community Forum!
1.Why was the dataset able to refresh in Power BI Service before, even though the file was private?
It’s likely that Power BI was using cached credentials from when the file was accessible. Another possibility is that the old SharePoint folder had permissions, which let the refresh go through without issues. But now that the file was moved, those permissions may have changed, causing Power BI to run into the error.
2.Is it possible that it was working off cached credentials or because the file was somehow publicly accessible before?
It’s worth checking if the original file or folder was set to “Anyone with the link,” which could’ve allowed it to be accessed without a login. You can verify this by reviewing the sharing settings for the file in SharePoint.
3. What are some best practices to make this scenario work — where the data needs to stay private, but the dashboard must remain publicly accessible via "Publish to Web"?
Here’s a list of steps you mayfollow :
Publish to Web only works with publicly accessible data. If the file needs to stay private, it might be worth considering secure embedding or other sharing options.
If this answer helped you to resolve your query,consider accepting it as solution.
Regards,
Pallavi.
Hi @snig2018narayan ,
Thank you for reaching out to us Microsoft Fabric Community Forum!
1.Why was the dataset able to refresh in Power BI Service before, even though the file was private?
It’s likely that Power BI was using cached credentials from when the file was accessible. Another possibility is that the old SharePoint folder had permissions, which let the refresh go through without issues. But now that the file was moved, those permissions may have changed, causing Power BI to run into the error.
2.Is it possible that it was working off cached credentials or because the file was somehow publicly accessible before?
It’s worth checking if the original file or folder was set to “Anyone with the link,” which could’ve allowed it to be accessed without a login. You can verify this by reviewing the sharing settings for the file in SharePoint.
3. What are some best practices to make this scenario work — where the data needs to stay private, but the dashboard must remain publicly accessible via "Publish to Web"?
Here’s a list of steps you mayfollow :
Publish to Web only works with publicly accessible data. If the file needs to stay private, it might be worth considering secure embedding or other sharing options.
If this answer helped you to resolve your query,consider accepting it as solution.
Regards,
Pallavi.
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!