Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
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.
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.
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.