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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Jack95
New Member

SharePoint.File Including Hidden Files

Hi,

 

I have a couple of queries connected to SharePoint using SharePoint.Files, but they're retrieving all files in the document library - I'd like to exclude hidden files, system files, forms, templates, etc. - I only want to retrieve a list of files created/added by end-users and that are visible when they click into the library. Is it possible to exclude these files?

 

Also, is there any implication if I use API Version 14 over 15 or vice versa or should the query work as expected with either API Version?

 

Any help is much appreciated.

 

Many Thanks,

 

Jack

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

 I only want to retrieve a list of files created/added by end-users and that are visible when they click into the library

You will see the files that YOU have access to.  This can be different from the files THEY have access to and you can risk oversharing and data leakage.

 

Best is to filter your SharePoint.Files results by FolderPath and file name pattern.

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

 I only want to retrieve a list of files created/added by end-users and that are visible when they click into the library

You will see the files that YOU have access to.  This can be different from the files THEY have access to and you can risk oversharing and data leakage.

 

Best is to filter your SharePoint.Files results by FolderPath and file name pattern.

v-tejrama
Community Support
Community Support

Hi  @Jack95,

Thanks for reaching out to the Microsoft fabric community forum.

 

I understand your concern and can confirm that when using SharePoint.Files in Power BI, it retrieves all files from the document library, including hidden files, system folders like "Forms", templates, and temporary files. You can efficiently filter these out by applying filters in Power Query: set [Attributes.Hidden] = false and [Attributes.IsFolder] = false, and exclude files starting with "Forms" or "~".

 

This ensures you’re only working with user uploaded files. As for the API version, Version 15 is the recommended choice since it's more up to date and compatible with new SharePoint sites. You can confidently move forward with these adjustments.

 

Best Regards,

Tejaswi.

Community Support

Hi @Jack95 ,

 

Just checking in have you been able to resolve this issue? If so, it would be greatly appreciated if you could mark the most helpful reply accordingly. This helps other community members quickly find relevant solutions.

 

Thank you.

Hi @Jack95 ,

 

I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

 

Thannk you,

Tejaswi.

Hi @Jack95 ,

 

Just checking in have you been able to resolve this issue? If so, it would be greatly appreciated if you could mark the most helpful reply accordingly. This helps other community members quickly find relevant solutions.

Thank you.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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