Forum Discussion
SharePoint.Contents - Expression Error - Policy & Templates Folder Missing
- 7 months ago
When you explain the issue, it’s important to clarify that Power BI does not use the SharePoint UI or navigation menu to find files. The SharePoint.Contents connector only accesses locations that exist as actual document libraries or folders in SharePoint's metadata.Although the “Policies & Templates” link is visible in the SharePoint UI, it is not currently set up as a physical library or folder in the site's metadata. This is why Power BI cannot access it.
It may help to ask your SharePoint Administrator to check where these files are stored and confirm if “Policies & Templates” is a real document library or simply a navigation link, custom view, or shortcut. If needed, they can update SharePoint so that this location is a standard document library or folder. Once it is set up this way, SharePoint.Contents will be able to access it properly.
Regards,
Microsoft Fabric Community Support Team.
Answer : - Sometimes SharePoint metadata changes behind the scenes (e.g., internal IDs or library refresh), even if the folder looks accessible in the browser. This can break the navigation record in Power Query.
- Instead of relying on the folder name in the navigation step, try using the Path column from SharePoint.Files or SharePoint.Contents and filter by the full path. This makes the query resilient to renames.
- If the folder is intermittently missing in preview, it could be due to throttling or sync delays. Add retry mechanism via a parameterized query or refreshing after a short interval can resolve it.
- Check if the folder is part of a recently archived or moved document library. Even if the URL works, the API may not return it until indexing completes.
- If performance is a concern with SharePoint.Files, you can still use it but apply an early filter on the Folder Path column before expanding. This limits rows and keeps refresh time reasonable.
- Finally, confirm that your credentials are set to Organizational Account and not cached incorrectly. Re-authenticate if needed.