Identifying expired sharing links in Share Point online with PnP PowerShell

Hsaniba 80 Reputation points
2024-03-16T06:45:53.9966667+00:00

Can someone guide me on how to retrieve all the expired sharing links for files using PnP PowerShell? I've tried various cmdlets but haven't gotten the desired results.

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-03-19T01:26:22.19+00:00

    Hi @Hsaniba,

    Thank you for posting in this community.

    We don't have a way to check the status of sharing links to files across the SharePoint organization. You can check the status of share links for a particular document library by referring to the PnP PowerShell in this thread.

    $ShareLink.``Expiration keeps track of when the link has expired, and you can filter the values in that column to find all expired shared links.

    User's image


    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.