Forum Discussion
vassp1980
Nov 25, 2024Copper Contributor
How do I apply retention label to a folder in a SharePoint library?
Hello All, Can you please advice how do I apply a "Retention label" (Created in M365 compliance centre) to folders in a Document Library? I created this retention label below I published thi...
TonyRedmond
Nov 28, 2024MVP
Did you use SharePoint search to check the syntax? I have found that documentlink queries need a terminating "/*" to work. If the search syntax doesn't work with SharePoint search, you'll waste a lot of time waiting for the auto-label policy to fail because it can't find anything.
vassp1980
Nov 28, 2024Copper Contributor
Hi thanks for reply.
This is strange. When I type in the following in a separate browser tab, it does load the finance folder directly :
https://psmodernworkplace.sharepoint.com/sites/VasModernWorkplaceTeamsSite/Working%20Documents/Finance/
But neither of the below works when pasting in sharepoint search :
(documentlink:"https://psmodernworkplace.sharepoint.com/sites/VasModernWorkplaceTeamsSite/Working%20Documents/Finance/*")
documentlink:"https://psmodernworkplace.sharepoint.com/sites/VasModernWorkplaceTeamsSite/Working%20Documents/Finance"
All I get is this when i search
- TonyRedmondNov 28, 2024MVP
Does the signed in user have access to the target site? You must be a member of the site for SharePoint search to work.
Things are different when you run a content search because administrative permissions are used to search the site.