How to find externally shared SharePoint item links and their users?

Roy_Jaze 40 Reputation points
2024-05-17T10:33:44.5533333+00:00

I am trying to find two pieces of information:

  1. All externally shared item links with share link types of Edit, View, Review, and Can't download.
  2. All users who have access to the specific 'People I choose' shared link.
  3. I have tried using a script (shared.txt) to find externally shared links for SharePoint items, but it only works for Direct, Anonymous view, and Anonymous edit types. How can I also include Review and Can't download link types? shared.txt
  4. I also shared an item link with specific people inside and outside the organization through 'People you choose'.
    1. I want to retrieve the generated link and the users who have access to it. I retrieved permission for the item as well, but some Principal login names were denoted as ".Flexible." instead of their User principal names.("SharingLinks.39353ffa-bb23-4ae9-b7f5-9603283c2e7a.Flexible.072c27ab-2092-4d55-a27c-")
    If anyone has knowledge about this, please help me out!
SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,382 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,866 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,965 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Niki Melanidou 115 Reputation points
    2024-05-17T10:36:20.9066667+00:00

    To find all externally shared SharePoint item links and their users, including those with Edit, View, Review, and Can't download link types, you can enhance your script to cover these additional link types. Firstly, ensure your script is updated to check for all link types, not just Direct, Anonymous view, and Anonymous edit. Secondly, for retrieving users with access to 'People I choose' links, you need to parse the permission details accurately. The ".Flexible." notation in Principal login names indicates a special kind of sharing link, so you'll need to map these to actual user principal names. Using the SharePoint Online Management Shell or PowerShell with the SharePoint PnP module can help you automate and extend these functionalities. Specific PowerShell cmdlets such as Get-PnPSharingLinks and Get-PnPUser can be particularly useful for retrieving detailed sharing information and user access lists.

    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.