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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
pallavi_r
Super User
Super User

How to capture document metadata of a sharepoint list from subfolder item

Hi All,

 

I am trying to capture the sharepoint online list items. The sub folder child items are not getting captured. Is it not feasible to capture list items specifically 'Retention Label' of child folder items via sharepoint online list v2.0. Kindly suggest.

 

Thanks,

Pallavi

1 ACCEPTED SOLUTION
pallavi_r
Super User
Super User

Hi All,

 

What I found the sharepoint folder & odata returns the sub folder child items detail but does not capture the retention label. And Sharepoint online list v2.0 captures the retention label but does not show the subfolder items.

Finally I tried sharepoint online list 1.0 which displays all attributes, child item attributes, expanding each of those columns, finally I found retention label of subfolder items. The column for retention label - Odata_Compliance_Tag.

 

I see lot of posts here says that 1.0 is slower to refresh and not recommended. But as of now this option is solving the purpose it seems. Will keep here posted on other option using Rest API call.

 

Thanks,

Pallavi

 

View solution in original post

7 REPLIES 7
pallavi_r
Super User
Super User

Hi All,

 

What I found the sharepoint folder & odata returns the sub folder child items detail but does not capture the retention label. And Sharepoint online list v2.0 captures the retention label but does not show the subfolder items.

Finally I tried sharepoint online list 1.0 which displays all attributes, child item attributes, expanding each of those columns, finally I found retention label of subfolder items. The column for retention label - Odata_Compliance_Tag.

 

I see lot of posts here says that 1.0 is slower to refresh and not recommended. But as of now this option is solving the purpose it seems. Will keep here posted on other option using Rest API call.

 

Thanks,

Pallavi

 

v-kpoloju-msft
Community Support
Community Support

Hi @pallavi_r,

 

Thank you for reaching out to the Microsoft Fabric Community Forum.

 

We really apologies for the inconvenience, after reviewing the issue of how to capture document metadata of a SharePoint list from subfolder item, here are few steps to may resolve the issue.

Please go through the following steps to resolve the issue:

 

  • In Power BI Desktop, navigate to home >get data >more >online services SharePoint Folder. Enter your SharePoint site url. Power BI will access and retrieve all files and folders from the designated SharePoint folder. Once the data is loaded, select Transform Data to open the Power Query Editor.
  • In the Power Query Editor, find the Folder Path column, which contains the complete path to each file or folder. Utilize this column to filter for specific subfolders by applying text filters, such as Text.Contains ‘Folder Path’, subfolder name, to capture files only from the desired subfolders.
  • To access the actual file content, expand the content column. Additionally, expand other essential metadata columns such as Name, Date Modified, Folder Path, Author, and File Size as needed.
  • If your SharePoint library includes custom columns such as Category or Status, you can integrate these with your document data. Utilize the SharePoint List connector to retrieve additional metadata from associated SharePoint lists and merge them using common fields like File Name or ID.
  • Remove any unnecessary columns, such as system generated ones. Rename columns for clarity, for instance, change name to filename. Additionally, filter out duplicate or unwanted items based on your criteria, such as Date Modified or File Type.
  • After cleaning and transforming the data, select close & apply to load it into Power BI for analysis and reporting.

If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.


Thank you.

Hi @v-kpoloju-msft ,

 

Thanks for reply. Will try these steps and get back. 

Just a quick question, I am able to get child folder contents via OData connector and sharepoint file/folder, but the metadata column for retention label is not there. Only while connecting through sharepoint list, I get the metadata column - retention label captured at root label.

 

I am new to sharepoint library, not sure what I am missing here. Kindly advise.

Thanks,

Pallavi

 

Akash_Varuna
Helper V
Helper V

Hi Pallavi ,

try these if you havent

  • Enable recursive querying in Power Query to capture all child items from subfolders.
  • Use the Folder connector instead of the List connector if items are in document libraries.
  • Expand hierarchy-related columns (e.g., Parent Folder Path) to fetch hidden subfolder items.
  • Ensure you have permissions to view and access subfolder content in SharePoint.

if this post helped accept this asthe solution and give a kudos

 

Hi @Akash_Varuna , Thanks for replying. Have tried all these but I am unable to get the Retention label in folder/file/odata connector for subfolder items. Only with sharepoint list, it shows retention label for root folder items.

Please let me know how can I capture retention label for sub folder items.

Thanks,

Pallavi

Hi Pallavi , Strange that did'nt work but now i think you could use the sharepoint API for connecting to PowerBI and provide the details of subfolder you need in that API endpoint and in PowerBI GetData through web 
Secondly you could try using dataflow in PowerBi for your particular use case i guess

Hi Pallavi , Strange that did'nt work but now i think you could use the sharepoint API for connecting to PowerBI and provide the details of subfolder you need in that API endpoint and in PowerBI GetData through web 
Secondly you could try using dataflow in PowerBi for your particular use case i guess

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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