6.3 Ensure expiration time for external sharing links is set

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

The external sharing features of Microsoft SharePoint let users in the organization share content with people outside the organization (such as partners, vendors, clients, or customers). External sharing in SharePoint is part of secure collaboration with Microsoft 365.

Rationale:

An attacker can compromise a user account for a short period of time, send anonymous sharing links to an external account, then take their time accessing the data. They can also compromise external accounts and steal the anonymous sharing links sent to those external entities well after the data has been shared. Restricting how long the links are valid can reduce the window of opportunity for attackers.

Impact:

Enabling this feature will ensure that link expire within the defined number of days. This will have an effect on links that were previously not set with an expiration.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

To set expiration time for external sharing links:

Navigate to SharePoint admin center https://admin.microsoft.com/sharepoint.

Click to expand Polices then select Sharing.

Under Choose expiration and permissions options for Anyone links check These links must expire within this many days.

Set to the desired number of days, such as 30.

Click Save.

NOTE: The UI settings will not appear if the External sharing slider for SharePoint is set to New and existing guests or anything less permissive.
To set expiration for anonymous access links using PowerShell:

Connect to SharePoint Online using Connect-SPOService

Run the following PowerShell command:

set-SPOTenant -RequireAnonymousLinksExpireInDays 30

Default Value:

Anonymous Sharing - On

Sharing Links Expiration - Off

See Also

https://workbench.cisecurity.org/benchmarks/10751