Creating a rule for automated deletion of unused files

%3CLINGO-SUB%20id%3D%22lingo-sub-1827386%22%20slang%3D%22de-DE%22%3ECreating%20a%20rule%20for%20automated%20deletion%20of%20unused%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1827386%22%20slang%3D%22de-DE%22%3E%3CP%3EHello%20together%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20wondering%20if%20there%20is%20a%20setting%20somewhere%20in%20OneDrive%20for%20Business%20which%20allows%20the%20user%20to%20set%20a%20time%20after%20which%20files%20should%20be%20deleted%20if%20they%20haven't%20been%20touched%2Fmodified.%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%20if%20I%20create%20a%20word%20file%20to%20write%20down%20some%20notes%20or%20create%20a%20draft%20and%20I%20forget%20about%20it%20will%20be%20in%20my%20OneDrive%20forever.%20I%20might%20not%20want%20that%20because%20after%20some%20time%20I%20will%20have%20hundreds%20of%20unused%20files%20that%20I%20will%20never%20use%20or%20look%20at%20again.%3C%2FP%3E%3CP%3ESo%20i%20was%20wondering%20if%20there%20is%20a%20rule%20for%20example%20that%20I%20can%20apply%20either%20to%20a%20specific%20folder%20or%20the%20complete%20OneDrive%20that%20%22monitors%22%20the%20files%20and%20deletes%20the%20once%20that%20have%20a%20last%20modified%20date%20older%20then%2090%20days.%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20first%20glance%20I%20couldn't%20find%20anything.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnly%20thing%20I%20came%20up%20with%20was%20a%20flow%20that%20runs%20everyday%20and%20checks%20those%20files%20for%20the%20last%20modified%20date%20and%20then%20deletes%20the%20once%20that%20have%20a%20value%20older%20then%2090%20days.%20It's%20not%20finished%20yet%20but%20I%20am%20pretty%20sure%20it%20will%20work%20BUT%20this%20might%20not%20be%20an%20appropriate%20solution%20for%20my%20customers.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20anyone%20have%20this%20issue%2Frequest%20before%3F%3C%2FP%3E%3CP%3EBest%20regards%20Pascal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1827386%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3EFiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMetadata%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1827564%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20rule%20for%20automated%20deletion%20of%20unused%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1827564%22%20slang%3D%22en-US%22%3EHave%20a%20look%20at%20retention%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fretention-policies-sharepoint%3Fview%3Do365-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fretention-policies-sharepoint%3Fview%3Do365-worldwide%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAdam%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1837292%22%20slang%3D%22de-DE%22%3ERe%3A%20Creating%20a%20rule%20for%20automated%20deletion%20of%20unused%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1837292%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F72542%22%20target%3D%22_blank%22%3E%40adam%20deltinger%3C%2FA%3E%26nbsp%3BHello%20Adam%2C%20thanks%20for%20sending%20me%20this%20link.%20Unfortunatly%20this%20isn't%20really%20what%20I%20need.%20It%20looks%20like%20retention%20policies%20are%20something%20the%20admin%20sets%20once%20and%20then%20applies%20to%20all%20users.%20This%20is%20not%20what%20I%20want%20because%20there%20might%20be%20users%20that%20don't%20want%20any%20of%20there%20files%20delete%20after%20sometime%20because%20they%20are%20all%20important%20or%20whatever.%26nbsp%3B%3C%2FP%3E%3CP%3EPerfect%20would%20be%20either%20something%20the%20user%20can%20set%20himself%20directly%20into%20OneDrive%20or%20a%20specific%20folder%20that%20you%20set%20the%20rentention%20policy%20for.%20For%20example%20you%20configure%20that%20the%20folder%20named%20%22Temporary%20files%22%20will%20apply%20the%20retention%20policy%20but%20all%20the%20other%20folder%20don't.%3C%2FP%3E%3CP%3EI%20hope%20this%20makes%20the%20point%20a%20little%20bit%20more%20clear.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello together,

 

I was wondering if there is a setting somewhere in OneDrive for Business which allows the user to set a time after which files should be deleted if they haven`t been touched/modified. 

For example if I create a word file to write down some notes or create a draft and I forget about it it will be in my OneDrive forever. I might not want that because after some time I will have hundreds of unused files that I will never use or look at again.

So i was wondering if there is a rule for example that I can apply either to a specific folder or the complete OneDrive that "monitors" the files and deletes the once that have a last modified date older then 90 days. 

At first glance I couldn`t find anything.

 

Only thing I came up with was a Flow that runs everyday and checks those files for the last modified date and then deletes the once that have a value older then 90 days. It`s not finished yet but I am pretty sure it will work BUT this might not be a appropriate solution for my customers.

 

Did someone have this issue/request before?

Best regards Pascal  

5 Replies

@adam deltinger Hello Adam, thanks for sending me this link. Unfortunatly this isn`t really what I need. It looks like retention policies are something the admin sets once and then applies to all users. This is not what I want because there might be users that don`t want any of there files delete after sometime because they are all important or whatever. 

Perfect would be either something the user can set himself directly into OneDrive or a specific folder that you set the rentention policy for. For example you configure that the folder named "Temporary files" will apply the retention policy but all the other folder don`t.

I hope this makes the point a little bit more clear. 

@adam deltinger Hello Adam, thanks for this answer. Unfortunatly we currently don`t have the Microsoft Information Protection activated. Is there any way that wouldn`t involve the Microsoft Information Protection?

 

Thanks in advance.

@adam deltinger If a retention label is applied in OneDrive but the document is moved to Sharepoint, then my understanding is that the label will remain with the document and therefore will be deleted when the retention criteria is fulfilled, even though these rules should only apply to files stored in Onedrive.

 

Ideally some kind of retention policy that could be applied to a specific file type or Onedrive folder, rather than to everything in every OneDrive.    As it is, scripting\automate are the only solutions I can think of.