Forum Discussion
Excel sharepoint data not available on Power BI Service
- 1 year ago
Hi mdufresne34 ,
Thanks for reaching out to the Microsoft fabric community forum.
This issue usually happens because of how Power BI Service handles SharePoint connections differently than Power BI Desktop. When you're using SharePoint.Files() in Power BI Desktop, it works fine because it's using your local credentials. But once the report is published to the Power BI Service, the service itself needs proper access permissions to the SharePoint file, and that's often where things break.
A more reliable approach is to use SharePoint.Contents() instead, which connects directly to the file path within SharePoint rather than loading all files from the site. Also, make sure to go into Power BI Service settings after publishing, and update the data source credentials to use OAuth2 with your organizational account.
This will allow the service to authenticate correctly and keep the SharePoint file connected during refresh. Here's a sample structure you can try using: connect to the SharePoint site with SharePoint.Contents, navigate to the "Shared Documents" folder, get the file, and then load your sheet as needed.
This method tends to be more stable for scheduled refreshes and avoids the issue of disappearing data after the first refresh.
If the response has addressed your query, please "Accept it as a solution" and give a "Kudos" so other members can easily find it.
Best Regards,
Tejaswi.
Community Support
Hi mdufresne34 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hello, I tried again using Sharepoint.Content() and it didn't solve the issue.