How to Remove Expiration Dates from Existing SharePoint Links
Question details
The user needs a way to bulk update and remove expiration dates from over a million existing 'Anyone' sharing links in SharePoint without recreating the URLs.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Managing and updating a large volume of expired automated 'Anyone' links in a SharePoint library.
- Observed behavior
- Existing 'Anyone' links have expired due to previous automated flows, and there is no built-in UI option to bulk update their expiration dates.
Before running bulk scripts on a large SharePoint library, ensure you have SharePoint Administrator permissions and test your PowerShell or Microsoft Graph API scripts on a small batch of files first.
Use PowerShell to Update SharePoint Link Expirations in Bulk
Since SharePoint lacks a built-in UI for bulk updating link expirations, using PowerShell is the recommended administrative approach for large libraries.
Microsoft SharePoint does not provide an out-of-the-box bulk operation within its standard web interface to remove expiration dates from existing 'Anyone' links.
To handle large-scale updates, administrators typically rely on the SharePoint Online Management Shell to automate the property changes across millions of files.
Launch the SharePoint Online Management Shell on your computer with administrator privileges.
Use the 'Connect-SPOService' cmdlet to authenticate and connect to your tenant's SharePoint admin center.
Run a customized PowerShell script designed to iterate through your target document library and update the sharing link attributes to remove the expiration date.

Automate Link Updates via Microsoft Graph API
For highly customized automated flows, Microsoft Graph API can be utilized to programmatically update sharing links without manual intervention.
Try WPS Office for Seamless Document Management
While you manage complex server-side SharePoint configurations, you can rely on WPS Office as a free, lightweight, and easy-to-use alternative for creating, editing, and sharing your local Office documents.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the on-screen instructions to complete the setup in minutes.
- 3. Open Your Documents: Launch WPS Office to instantly open, edit, and save your Word, Excel, and PowerPoint files.

Frequently Asked Questions
Why did my SharePoint 'Anyone' links expire automatically?
SharePoint administrators often set a tenant-level policy that forces 'Anyone' links to expire after a certain number of days (e.g., 30 days) for security reasons. Links created while this policy is active will expire automatically unless manually extended.
Can I remove link expiration dates directly from the SharePoint web interface?
You can change or remove the expiration date for individual files via the 'Manage Access' panel in the SharePoint UI, but there is currently no built-in option to perform this action in bulk for multiple files.
Will removing the expiration date recreate the sharing link?
No. If updated correctly using PowerShell or the Microsoft Graph API, the existing sharing link's properties are modified without generating a new URL. This preserves the original link for users who already have it.




