OneDrive: Force expire content that is shared externally without using Anonymous links

%3CLINGO-SUB%20id%3D%22lingo-sub-1454154%22%20slang%3D%22en-US%22%3EOneDrive%3A%20Force%20expire%20content%20that%20is%20shared%20externally%20without%20using%20Anonymous%20links%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1454154%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20the%20title%20suggest%20I%20am%20trying%20to%20find%20a%20way%20so%20that%20we%20can%20force%20links%20shared%20externally%20to%20expire%20after%20X%20days%2C%20but%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%3EWITHOUT%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eusing%20anonymous%20links.%20Sometimes%20we%20have%20high%20sensitive%20documents%20that%20we%20would%20like%20to%20have%20available%20for%2024%20hours%20and%20then%20expire.%20I%20did%20notice%20that%20this%20setting%20only%20works%20on%20anonymous%20links%2C%20however%20we%20are%20trying%20to%20avoid%20using%20that%20feature%20since%20it's%20the%20most%20permissive%20and%20since%20we%20are%20a%20financial%20institution...this%20can%20prove%20quite%20problematic%20when%20it%20comes%20to%20highly%20sensitive%20data%20that%20may%20be%20shared%20like%20SSN%2C%20CCN%2C%20etc...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20do%20this%3FPerhaps%20using%20powershell%20cmds%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1454154%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1455677%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%3A%20Force%20expire%20content%20that%20is%20shared%20externally%20without%20using%20Anonymous%20links%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1455677%22%20slang%3D%22en-US%22%3E%3CP%3ENot%20sure%20I%20understand%20correctly%2C%20but%20you%20can%20control%20link%20expiration%20(any%20link%20type)%20via%20the%20SPO%2FODFB%20admin%20portal.%20Once%20configured%2C%20it%20will%20apply%20to%20already%20shared%20links.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20apply%20it%20only%20on%20some%20links%2Ffiles%2C%20you%20will%20have%20to%20enumerate%20those%20then%20use%20CSOM%2FGraph%20API%20to%20update%20the%20link%20properties.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1820260%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%3A%20Force%20expire%20content%20that%20is%20shared%20externally%20without%20using%20Anonymous%20links%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1820260%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F326922%22%20target%3D%22_blank%22%3E%40Odenkaz%3C%2FA%3E%26nbsp%3BDid%20you%20ever%20get%20a%20good%20answer%20to%20this%20question%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

 

As the title suggest I am trying to find a way so that we can force links shared externally to expire after X days, but WITHOUT using anonymous links. Sometimes we have high sensitive documents that we would like to have available for 24 hours and then expire. I did notice that this setting only works on anonymous links, however we are trying to avoid using that feature since it's the most permissive and since we are a financial institution...this can prove quite problematic when it comes to highly sensitive data that may be shared like SSN, CCN, etc...

 

Is there a way to do this?Perhaps using powershell cmds? 

 

 

2 Replies

Not sure I understand correctly, but you can control link expiration (any link type) via the SPO/ODFB admin portal. Once configured, it will apply to already shared links.

 

If you want to apply it only on some links/files, you will have to enumerate those then use CSOM/Graph API to update the link properties.

@Odenkaz Did you ever get a good answer to this question?