Mandatory Anonymous Link Expiration is a new feature for SharePoint Online and OneDrive for Business. This feature will start rolling out today (12/01/2016) and is scheduled to complete in the coming weeks.
What does this feature do?
With this feature, administrators can now set a mandatory expiration length for all anonymous links created in their company to help promote security and link hygiene. End users will be required to create links that match or are shorter than the stated value.
What do I need to do to prepare for this change?
There is no default value for anonymous link expiration. To begin using this feature, use the SharePoint Online Management Shell using the “RequireAnonymousLinksExpireInDays” parameter.
As an example, this will set expiry for 30 days:
Set-SPOTenant –RequireAnonymousLinksExpireInDays 30