How to Fix SharePoint Sharing Link Expiration Dates Returning Null in REST API
Question details
The user needs to retrieve the expiration date of a SharePoint sharing link using the REST API, but the property returns a null value.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Querying the SharePoint Sharing Links list via the REST API to find the exact expiration date for auto-expiring guest links.
- Observed behavior
- The 30-day expiration date is correctly displayed in the SharePoint permissions interface, but the ExpirationDateTime property evaluates to null in the REST API response.
Ensure you have the necessary site collection administrator permissions and have your exact REST request URL, headers, and response payload ready for troubleshooting.
Verify Expiration in SharePoint UI and Check API Endpoint Support
Confirm the expiration date exists in the user interface and validate if your current API version supports exposing this property for auto-expiring links.
Certain SharePoint REST endpoints do not consistently expose the ExpirationDateTime property for auto-expiring guest links. This is a known behavior in specific API versions where the user interface calculates the expiration dynamically, rather than storing it directly in the queried list property.
Navigate to the SharePoint document or folder in your web browser, click 'Manage Access', and verify that the 30-day expiration is actively displayed on the generated sharing link.
Consult the official Microsoft SharePoint REST API documentation to ensure your specific endpoint and API version natively support the ExpirationDateTime field for the specific link type you generated.
If the legacy SharePoint REST API continues to return null, test the request using the Microsoft Graph API (such as the /shares or /permissions endpoints), which often provides more consistent sharing metadata.
Post your specific request URL, response payload, permissions, and link type to the Microsoft SharePoint Q&A forum to get detailed insights on undocumented REST API behaviors.

Looking for a Simpler Way to Share and Collaborate on Documents?
If managing SharePoint permissions and REST APIs is slowing down your team's workflow, try WPS Office. It offers an intuitive, lightweight, and free alternative for creating, editing, and securely sharing documents without complex backend API configurations.
- 1. Download and Install: Download WPS Office for free from the official website and complete the quick installation process.
- 2. Upload and Manage Files: Sign in to access free cloud storage, upload your Office documents, and manage them from a centralized workspace.
- 3. Share Securely: Right-click any document to generate a secure sharing link with customizable permissions and easily manageable expiration settings directly from the UI.

Frequently Asked Questions
Why does my SharePoint sharing link expiration show as null in the REST API?
This frequently happens because certain legacy SharePoint REST endpoints do not consistently expose the ExpirationDateTime property for auto-expiring guest links, even if the expiration is correctly displayed in the web interface.
Is there an alternative to the SharePoint REST API for checking link expirations?
Yes, developers are generally encouraged to migrate to the Microsoft Graph API. The Graph API handles permissions and sharing links more robustly and is more likely to provide the missing expiration data.
Can I force the REST API to show the expiration date?
If the specific endpoint does not support exposing the property for that exact link type, you cannot force it via the request. You will need to parse the data from a different endpoint or query the Microsoft Graph API instead.




