Creating Library or Content type “Delete All Versions” retention policies within Office 365

Copper Contributor

My aim is to delete all versions of a document if the document was last modified 30 days or more for our Office 365 tenant site collection library.

 

I cannot work with versions or delete versions for documents by applying a policy created using Compliance Center. We can work with original documents but not versions as there is no option for it in the front end as well as in the back end API. Modern retention policies to my knowledge currently does not support deleting all versions e.g. if the last modified date for a document has passed certain time (30 days or so) Delete All Versions.

 

We can do it with the Classic information management policies which are available on the library or site content types. Sample Image attached. With Office 365 I am unable to do the same using PowerShell or CSOM as API’s are not available. Only exposed API is the "Microsoft.Office.Client.InformationPolicy" which deals with the site policy and not with the document library or content type policies.

 

Any CSOM, PowerShell or REST API resources which can be used to solve the above issue?

0 Replies