Skip to content
Copy as Markdown

Anonymous Links Expiry

ScopeTenantRoleL1 Read to view · L1 Read/Write to actLicenceSharePoint Online

This policy sets an expiration date for anonymous sharing links, limiting how long external users can access shared content. Expiring links after a defined period reduces the risk of unauthorized access and helps maintain control over shared resources.

Settings this baseline controls

SettingWhat it does
Anonymous link expiry in daysSpecifies the number of days before anonymous links expire. The value must be at least 0, and no more than 730. Learn more
Adding a baselineAdd, configure or remove a single baseline on a tenant, a user or a group, without deploying a whole scheme.

Configure it

This baseline sets the longest an “Anyone” link in SharePoint and OneDrive can last, 90 days by default. It applies to the whole tenant.

  1. Add the baseline to the tenant (Adding a baseline), or deploy it to many tenants at once as part of a scheme (Deploying a scheme).

  2. Set Anonymous Links Expiry (the settings table calls it Anonymous link expiry in days) to the longest life you want an “Anyone” link to have. The default is 90; you can enter any number from 1 to 730, or 0 for no expiry. With a number of days set, every “Anyone” link the tenant creates from then on expires within that many days.

  3. The expiry only takes effect where the tenant’s sharing policy allows Anyone links; if it doesn’t, there’s nothing for an expiry to apply to (see Global Default Sharing Policy).

  4. Select Save. To have Octiga put the expiry back automatically if it’s changed or removed in Microsoft 365, turn on Auto on the baseline’s row on the tenant’s Org-level Baselines tab, or on the scheme for a baseline a scheme supplies. It acts only while the tenant’s Allow auto-remediation setting is on (Tenant settings).

Check it worked

Passing means SharePoint Online’s anonymous link expiry reports the number of days you set (with 0, that no expiry is required). Check it in the SharePoint admin centre, under Policies → Sharing → Choose expiration and permissions options for Anyone links → These links must expire within this many days. With a number of days set, a new “Anyone” link expires within that many days of being created.

Standards this addresses

CISM365 7.2.9v8 3.3
NISTPR.AC-3PR.DS-5AC-20
ISO 27001A.8.12A.8.23
GDPRArticle 32

Doing this for every tenant?

Step through the deploy wizard to apply a scheme to a tenant, groups or users, and see what Managed and Direct do at deploy time.