Sharing links in SharePoint Online do not expire by default. Without a configured expiry policy, a link shared with an external partner today will still work in five years - unless someone manually removes it. For most organisations, that gap between intended access duration and actual access duration is where external sharing risk accumulates quietly, one project at a time.
This guide covers how to configure link expiry at tenant level, what each setting controls, how users can set expiry when creating individual shares, and how to handle the links that existed before any policy was in place.
What happens without a link expiry policy
Microsoft 365 ships with no default expiry on sharing links. When a user creates an Anyone link or a Specific People link, SharePoint sets no end date. The recipient can bookmark the URL and return to the file indefinitely, even after the sharing relationship was intended to be temporary.
The business risk is straightforward: a contractor finishes a project in March, and the Anyone link to the project folder continues to work through the following year. The contractor may no longer be engaged, but their access has not been revoked because nobody removed the link and no policy enforced a cutoff. Multiply this across a tenancy with hundreds of active projects and the exposure surface becomes difficult to track manually.
Setting the default link expiry at tenant level
Tenant-level expiry is the foundation of a link governance policy. It ensures that new Anyone links created anywhere in the tenant automatically receive an expiry date, without relying on individual users to set one each time they share.
Using the SharePoint admin center
- Sign in to the Microsoft 365 admin center and navigate to SharePoint admin center.
- In the left sidebar, select Policies, then Sharing.
- Scroll to the section labelled Choose expiration and permissions options for Anyone links.
- Check the box for These links must expire within this many days.
- Enter your preferred number of days. Thirty days is a common starting point; fourteen days suits more sensitive environments such as legal or finance teams.
- Select Save. The setting takes effect for all new Anyone links created from that point forward.
Using PowerShell for finer control
For organisations managing settings programmatically or applying different policies to specific site collections, PowerShell gives more granular control:
# Set tenant-wide default expiry for Anyone links (in days)
Set-SPOTenant -RequireAnonymousLinksExpireInDays 30
# Apply a tighter expiry to a specific site collection
Set-SPOSite -Identity "https://contoso.sharepoint.com/sites/Partners" -AnonymousLinkExpirationInDays 14
The -RequireAnonymousLinksExpireInDays parameter accepts values between 1 and 730. Setting it to 0 removes the expiry requirement. PnP PowerShell has equivalent cmdlets for both operations.
Setting expiry when creating an individual share
Even without a tenant policy, individual users can set an expiry date when they create a sharing link. The option appears inside the sharing dialog:
- Open the file or folder in SharePoint Online and select Share.
- In the sharing dialog, click the link settings icon (pencil or gear) next to the link type dropdown.
- Look for the Expiry date field. Set a date using the calendar picker.
- Confirm the settings and copy or send the link.
If a tenant-level expiry is configured, users cannot set an expiry date that exceeds the tenant maximum. They can set a shorter date but not a longer one. If no tenant-level expiry is set, users have no upper limit unless a site collection policy is applied.
Link types and expiry: what the policy covers
| Link type | Tenant-level expiry available? | Per-share expiry available? | Default (no policy set) |
|---|---|---|---|
| Anyone (anonymous) | Yes - admin center and PowerShell | Yes | No expiry |
| Specific people (external) | PowerShell only (site level) | Yes | No expiry |
| People in your organisation | No built-in tenant enforcement | Yes (optional) | No expiry |
| People with existing access | No | No | No expiry (does not create new access) |
The practical takeaway: the admin center setting enforces expiry on Anyone links only. External partners who receive a Specific People link are not automatically covered by the tenant-level policy. For those links, per-share expiry discipline or a SharePoint Advanced Management policy is required.
Auditing links that have no expiry or an expired date
Configuring an expiry policy does not clean up what already exists. Links that predate the policy keep their original settings - no expiry date if none was set when the link was created. Run an audit of existing links as the companion step to policy configuration.
ShareMaster's Shared Links and Permissions feature surfaces active sharing links across the sites connected to your account. The report shows each link's type, creation date, and expiry date (if set). From that view you can select links with no expiry or a date that has already passed, and remove them in bulk without navigating library by library.
For ongoing governance, run this audit on a quarterly schedule at minimum. External sharing tends to expand during project kick-offs and contract periods, and those contracts end on schedules that do not align with SharePoint's default of "no expiry". For the step-by-step removal process, see how to bulk remove SharePoint sharing links.
Frequently Asked Questions
Does the SharePoint link expiry setting apply to all link types?
The admin center expiry setting applies to Anyone (anonymous) links. Specific People and organisation-scoped links can also be given an expiry date when they are created, but there is no built-in tenant-level forced expiry for those link types unless you configure it via PowerShell at the site level.
What happens when a SharePoint sharing link expires?
When a sharing link reaches its expiry date, it is automatically deactivated. Anyone who follows the link after expiry receives an access denied message. The file itself is not deleted; only the link stops working. A site owner or admin can remove or renew the link at any time.
Can site owners override the tenant-level link expiry?
By default, site owners can set a shorter expiry than the tenant maximum but cannot exceed it. If your tenant policy sets a 30-day maximum, a site owner can choose 7 days but not 60 days. Admins can restrict this further by locking down sharing settings at the site collection level via the SharePoint admin center or PowerShell.
Do existing sharing links inherit the new expiry policy?
No. The tenant-level expiry setting only applies to links created after the policy is configured. Links that existed before the change retain their original settings, including no expiry if that was the default at creation time. Cleaning up pre-existing links requires a separate audit and removal process.