Assign Expiry Date to the SharePoint online contents - link share

Anandhan Sathyanarayanan 141 Reputation points
2021-12-31T06:48:13.833+00:00

We have the requirement to specify an expiry date on the link share either through UI or scripts. At present OneDrive does provide the ability to set an expiration date, but only when sharing using “Anyone with the link”

Please help to assign the expiry date to the SharePoint online contents link share (other than anyone sharing).

Note: Need to set an expiry date for the other share option excluding anyone share

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,629 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,991 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,621 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yi Lu_MSFT 17,606 Reputation points
    2021-12-31T08:58:44.407+00:00

    Hi @Anandhan Sathyanarayanan
    Per my research, there is no ootb method to achieve your requirement, this is by design.

    You could only set expiry date for sharing link using “Anyone with the link”:

    161520-image.png

    What's more, you could set the default expiry date in sharepoint admin center > Active sites >sharing, for example, I set 20 expiry date for a site:

    161556-image.png

    Then the default expiry date is Jan 20 2022, and you could not set expiry date override Jan 20 2022:

    161622-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. michaelryan19 26 Reputation points
    2022-04-19T07:11:37.153+00:00

    We have run into this one as well recently. It would be great to share specific files with guests and limit the duration they have access to the SPO files they have been granted access to.

    1 person found this answer helpful.
    0 comments No comments

  2. Чебукин Андрей 1 Reputation point
    2022-04-14T12:39:30.483+00:00

    But Teams somehow sets expiration dates for recordings. Then it is possible somehow!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.