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

The Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more

Reply
mopetkewi
Frequent Visitor

using sharepoint.contents

When trying to use sharepoint.contents to open a sharepoint folder in power query, we notice that for some users excel files are not recognized when we drill to the folder.  But if we change mcode to sharepoint.file the exel files populate correctly.  Any reason why sharepoint.contents does not work?  We like sharepoint.contents better because it creates a more logical structure in power query.  (working with a class of students - for most sharepoint.contents works fine but for a couple the excel files are not recognzied)

2 REPLIES 2
ShivekMaharaj
Impactful Individual
Impactful Individual

Hi @mopetkewi,

 

Since SharePoint.Files is returning the workbooks correctly, I would avoid changing the downstream Excel logic for now and test the SharePoint.Contents source itself.

 

One option that may be worth trying is the newer connector implementation:

SharePoint.Contents("https://tenant.sharepoint.com/sites/site", [ApiVersion = 15, Implementation = "2.0"])

Microsoft documents both ApiVersion and Implementation = "2.0" as supported options for SharePoint.Contents. The latter switches the call to the newer SharePoint connector implementation.

 

I would compare this on one machine where the files appear and one where they do not. If the same site URL and credentials are being used but the result differs between students, I would also clear the SharePoint data source permissions in Power Query and reconnect with the same Organizational Account before testing again.

 

Since SharePoint.Files already sees the files, this looks more like an enumeration/navigation issue with SharePoint.Contents than an issue with the Excel files themselves.

v-achippa
Community Support
Community Support

Hi @mopetkewi,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Since the affected users can access the same SharePoint site and SharePoint.Files() returns the excel files successfully, this does not look like a general permissions issue. SharePoint.Files() and SharePoint.Contents() retrieve the share point content differently, so try using SharePoint.Contents() with ApiVersion = 15.

If the issue persists, consider using SharePoint.Files() instead, as it correctly returns the Excel files for the affected users.

 

Thanks and regards,

Anjan Kumar Chippa

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.