How to get a list of shared links in a SharePoint Online document library? Any PowerShell or other way?

frob 4,261 Reputation points
2022-09-02T20:41:59.363+00:00

Hi there
How to get a list of shared links in a SharePoint Online document library? Any PowerShell or other way?
(Shared links when we click on the ellipsis next to a folder/file, and click Share, and type the emails of users)
Thanks.

Microsoft 365 and Office SharePoint For business Windows
Windows for business Windows Server User experience PowerShell
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2022-09-05T07:12:31.833+00:00

    Hi @frob
    Please run the following PnP powershell code:
    237705-shared.txt
    The running result is shown in the following figure:
    237658-16.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.

    7 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2022-09-04T03:10:52.583+00:00

    Hi @frob

    You can try using Microsoft Purview:

    How to identify resources shared with external users

    https://learn.microsoft.com/en-us/microsoft-365/compliance/use-sharing-auditing?view=o365-worldwide#how-to-identify-resources-shared-with-external-users

    ------------------------------------------------------

    If this is helpful please accept answer.


  2. Alvaro Avila 170 Reputation points
    2024-07-25T13:52:35.2433333+00:00

    Hi Frob,

    You can use this app to generate this report easily: https://github.com/Barbarur/NovaPoint

    It's free and open-source.

    You can generate a report with all the permissions, including Shared links: https://github.com/Barbarur/NovaPoint/wiki/Solution-Report-PermissionsReport

    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.