Forum Discussion
ellan1537
Jul 24, 2023Iron Contributor
SharePoint: Report to fetch content older than X amount of time
Hello all, My M365 tenant has content size of our 1.7 PB with close to 90,000 site collections. My requirement is to fetch the report of content (should crawl through all document libraries in al...
Vivek Jagga
Jul 25, 2023Copper Contributor
Hi ellan1537,
My thought here is to use Search API to get such info, but not to execute on all. Run script in such a way so that it will run for a site max in memory.
My thought here is to use Search API to get such info, but not to execute on all. Run script in such a way so that it will run for a site max in memory.
Paul de Jong
Jul 25, 2023Iron Contributor
Using search api gives perhaps more control than using Content Search from Compliance Center but requires more knowledge of the search api.
Using search API has pros and cons. I personally think it is great. It can be used in many different applications (PowerShell, csom, node.js, ...) but assumes that the content has been indexed and there are no blind spots plus the user must have at least read access.
Also make sure to iterate over the search results because they will only be returned in sets of 500 items. Also make sure the trimduplicates is set to false.
Search will only return the latest version. All the document versions are not exposed.
Using search API has pros and cons. I personally think it is great. It can be used in many different applications (PowerShell, csom, node.js, ...) but assumes that the content has been indexed and there are no blind spots plus the user must have at least read access.
Also make sure to iterate over the search results because they will only be returned in sets of 500 items. Also make sure the trimduplicates is set to false.
Search will only return the latest version. All the document versions are not exposed.