Bulk remove expired anyone links

Jason McBee 0 Reputation points
2024-03-27T14:38:04.0333333+00:00

So I have 1.1 million files in a library. I have flows in place that when a new document is uploaded that it creates a Anyone sharing link. Then it is uploaded to SharePoint list, Salesforce and SQL. All of my links are expired. I dont want to recreate the link. I can manually go file by file and remove the expired date. Is there a way to bulk remove the expired date? I already fixed them where new files will not expire.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-03-28T02:43:07.86+00:00

    Hi @Jason McBee,

    Thank you for posting in this community.

    There is no way for us to bulk modify the expiration time of a link that has already expired. Because the expiration date has already been recorded for the expired links, even if we change the site level setting to extend the expiration time after the expiration date, it will not affect the links that have already reached the expiration date.

    Reference: Bulk update of anonymous link expiration date for existing links.

    The best solution for now is to modify the expiration settings at the site or tenant level (set the expiration time as you need) and then create new links. Don't change your old links (they're expired and unusable anyway).

    First, please refer this article on setting the expiration time settings for your tenant's Anyone links. The main part is the Advanced settings for Anyone links section.

    User's image

    Second, change the setting of the expiration time of the site level. You can choose the site you want to set. You can also choose to skip this part. Sites that are not set will be consistent with the tenant's settings.

    User's image

    User's image

    Finally recreate the link.


    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.


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.