You set a sharing expiration date in SharePoint, but existing sharing links still work past that date. This happens because expiration policies only affect newly created links, not links that were already sent. This article explains why existing links remain active and shows you how to revoke or replace them manually.
Key Takeaways: Fixing Expiration Dates for Existing Sharing Links
- SharePoint admin center > Policies > Sharing: Controls default expiration for new links only; does not retroactively apply to existing links.
- Site settings > Sharing > Manage guest links: Lets you view and delete active sharing links that were created before the policy change.
- PowerShell cmdlet Revoke-SPOSiteGuestLink: Removes all guest links for a site when the web UI is not sufficient.
Why Expiration Dates Do Not Apply to Existing Links
SharePoint treats each sharing link as a standalone token. When you set or change an expiration policy in the SharePoint admin center, that policy applies only to links created after the change. Links that were already generated keep their original expiration settings, which may be set to never expire.
This behavior is by design to avoid breaking access for users who already received a link. However, it creates a security gap if you intend to enforce a time limit on all shared content. The only way to force expiration on existing links is to manually revoke them and then reshare with the new policy in place.
How SharePoint Stores Expiration Information
Each sharing link contains a unique ID and an expiration timestamp. When a user clicks the link, SharePoint checks the timestamp on that specific link, not the site-level policy. If the link was created before the policy was updated, its timestamp remains unchanged. The site policy only sets the default expiration for new link creation.
Steps to Revoke Existing Sharing Links and Apply Expiration
- Open the SharePoint site where links need to be revoked
Go to the site collection that contains the files or folders with existing sharing links. You must be a site collection administrator or have full control permissions. - Navigate to site settings
Click the gear icon in the upper right corner and select Site information. Then click View all site settings. - Open the sharing management page
Under the Users and Permissions section, click Site permissions. Then click the Sharing tab at the top of the permissions page. - Manage guest links
In the Sharing section, click Manage guest links. This page lists all active sharing links for the site, including links sent to external users. - Select the links to revoke
Check the box next to each link that should be expired. You can sort by Created date to identify older links that were made before the policy change. - Delete the selected links
Click the Delete button at the top of the list. Confirm the deletion. This immediately revokes access for anyone using those links. - Reshare the files with the new expiration policy
Return to the file or folder, click Share, and generate a new link. SharePoint now applies the current site expiration policy to this new link.
Using PowerShell to Revoke All Guest Links for a Site
When you have many links to revoke, use SharePoint Online Management Shell to remove all guest links at once. Run the following command after connecting to SharePoint Online:
Revoke-SPOSiteGuestLink -SiteUrl "https://yourtenant.sharepoint.com/sites/yoursite"
This cmdlet removes every guest link for the specified site. After running it, reshare the content as needed. The new links will respect the current expiration policy.
If Sharing Expiration Still Does Not Work After Revoking Links
Expiration Policy Is Not Set at the Tenant Level
The expiration policy must be enabled in the SharePoint admin center before it applies to new links. Go to SharePoint admin center > Policies > Sharing. Under Expiration, select the checkbox for Expire guest access links automatically and set the number of days. Click Save. This setting applies to all sites that inherit tenant policies.
Site Overrides the Tenant Policy
If a site has a custom sharing policy that disables expiration, the tenant policy does not apply. Check the site-level sharing settings by going to Site settings > Site permissions > Sharing. Look for the expiration section. If it says No expiration, the site overrides the tenant setting. Change it to Expire guest access links automatically to match the tenant policy.
Links Are Sent to Internal Users Only
Expiration policies apply only to guest links, which are links shared with people outside your organization. Links shared with internal users do not expire based on this setting. To expire internal links, you must manually delete them from the Manage guest links page or use PowerShell to remove all links for the site.
New Links vs Existing Links: Policy Behavior Comparison
| Item | New Links Created After Policy Change | Existing Links Created Before Policy Change |
|---|---|---|
| Expiration applied automatically | Yes | No |
| Can be revoked via web UI | Yes, individually | Yes, individually or bulk via PowerShell |
| Respects custom site policy | Yes | No, uses original creation timestamp |
| Requires manual resharing after deletion | No | Yes |
Now you can enforce expiration on all shared content by first revoking old links and then generating new ones. Use the Manage guest links page for small numbers of links or PowerShell for bulk operations. Always verify that the tenant and site policies match before sharing new links.