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.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,783 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,025 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,955 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 18,020 Reputation points Microsoft Vendor
    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.