need to list files with specific content type with their metadata

Mohammed OUAHI 60 Reputation points
2024-04-22T11:36:33.3933333+00:00

Hi,

I need to create a sharepoint list that retrieves files with a specific content type with all their metadata , file can be created acrosse all the tenant .

can you help please?

Thanks,

Mohammed.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,688 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 21,611 Reputation points Microsoft Vendor
    2024-04-24T07:07:24.08+00:00

    Hi @Mohammed OUAHI ,After extensive research and testing, this process is complex and currently there is no direct way to implement it. There is a workaround for your reference:

    First, use PowerShell to obtain the usage of the specified Content Type, but currently it can only be obtained at the List/Library level. It is recommended to use PowerShell to find which libraries use this Content Type, and then manually export to Excel. Merge all Excel files and select the files using this Content Type.

    Reference:

    https://www.sharepointdiary.com/2017/04/sharepoint-online-find-content-type-usage-using-powershell.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Then, use PowerShell to import the organized files, iterate through all files, get the metadata of the files, and then export the results to a csv file.

    Reference:

    https://www.sharepointdiary.com/2018/03/sharepoint-online-get-file-properties-using-powershell.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Finally, organize the csv file and import it to a blank SharePoint List.

    If you feel that this is not satisfactory to you, you can go to the Partner Center to get a better solution.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.