Microsoft 365 tenant · SharePoint, OneDrive & Teams

Make Anyone links expire and grant view only

When it fails: Anyone links never expire or allow editing. Links that need no sign-in stay valid indefinitely and may let unknown people modify or upload content.

CB-M365-COLLAB-010mediumactivemanualprofile baseline

Description

Where Anyone links are allowed (an exception to CB-M365-COLLAB-003, for the tenant, a site or a OneDrive), they are constrained:

  • they expire after at most {{ anyone_link_max_days }} days (RequireAnonymousLinksExpireInDays);
  • they only give View permission, for files and for folders (FileAnonymousLinkType and FolderAnonymousLinkType = View).

If neither SharePoint nor OneDrive allows Anyone links, the control is met.

Rationale

An Anyone link is a bearer credential. An expiry date bounds how long a leaked or forgotten link exposes the content. View-only stops unauthenticated people from altering documents, replacing them with malicious files, or using an upload folder to plant content in the tenant.

Impact

Users must recreate links after expiry. A shorter expiry also shortens existing links when the new value is lower. File requests and View, edit, and upload folder links stop working.

Parameters

ParameterBaselineHardenedBounds

The value used is your override (tailoring file), else the profile's, else the one of the profile it extends, else the default. Bounds limit what an override may set.

Audit

  1. Sign in to the SharePoint admin center (https://admin.microsoft.com/sharepoint) as at least a Global Reader.
  2. Browse to Policies > Sharing. If both sliders are below Anyone, the control is met.
  3. Otherwise, under Choose expiration and permissions options for Anyone links, check that These links must expire within this many days is selected with at most {{ anyone_link_max_days }}, and that These links can give these permissions is View for Files and Folders.
  4. With the SharePoint Online Management Shell (SharePoint Administrator): Get-SPOTenant | Select-Object SharingCapability, OneDriveSharingCapability, RequireAnonymousLinksExpireInDays, FileAnonymousLinkType, FolderAnonymousLinkType.
  5. Fail if Anyone links are allowed and RequireAnonymousLinksExpireInDays is 0 or greater than {{ anyone_link_max_days }}, or if either link type is not View.

Remediation

  1. In the SharePoint admin center, browse to Policies > Sharing > Choose expiration and permissions options for Anyone links.
  2. Select These links must expire within this many days and enter {{ anyone_link_max_days }} or less.
  3. Set Files and Folders to View. Select Save. Role: SharePoint Administrator.
  4. PowerShell equivalent: Set-SPOTenant -RequireAnonymousLinksExpireInDays {{ anyone_link_max_days }} -FileAnonymousLinkType View -FolderAnonymousLinkType View.

References

Mappings

FrameworkIDRelation
NIST SP 800-53 Rev. 55.1.1AC-3related
NIST SP 800-53 Rev. 55.1.1AC-22related
CISA SCuBA Microsoft 365 Secure Configuration Baselines2.0.0MS.SHAREPOINT.3.1v1equivalent
CISA SCuBA Microsoft 365 Secure Configuration Baselines2.0.0MS.SHAREPOINT.3.2v1equivalent

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

People and lifecycle

Authors
Introduced inv0.1.0
Created, updated2026-10-24, 2026-10-24
Translationsfr