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

Hsaniba 100 Reputation points
2024-05-18T03:12:14.15+00:00

Hi guys, 

I want to gather two information from you. 

  1. Getting all shared links externally for an item, which may have share link type of Edit, View, Review and can't download. 
  2. Getting all specific 'people I choose' from the shared link.  

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

  1. I have to find the externally shared links for items in SharePoint. I have used the below given script(shared.txt), which only takes shared link type of Direct, Anonymous view and Anonymous edit. It won't also take shared link type of review and can't download.

shared.txt 

Screenshot 2024-05-17 122036

 2. Getting  guest users shared link. It was given through 'People you choose'. 

Screenshot 2024-05-17 133526

In this case, I shared the item link with specific people inside and outside the organization.   

Screenshot 2024-05-17 134010 After that link was generated. I want to fetch that link and the users who are having access to it. I also retrieved permission for the item. Some Principal login name for that item denoted as ".Flexible." not their User principal name. 

Anyone having knowledge about this, Please help me out! 

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,914 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.
2,734 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,851 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Haoyan Xue_MSFT 20,986 Reputation points Microsoft Vendor
    2024-05-20T06:38:02.1033333+00:00

    Hi @Hsaniba ,

    Thank you for posting in this community.

    To find externally shared SharePoint item links and their users, you can use the following steps:

    1. Go to the SharePoint site where the item is located.
    2. Navigate to the item and click on the "Share" button.
    3. In the "Share" dialog box, you will see a list of all the links that have been created for the item. This includes links with the share link type of Edit, View, and Review.
    4. To see the users who have access to a specific link, click on the link and then click on the "Manage access" button.
    5. In the "Manage access" dialog box, you will see a list of all the users who have access to the link. This includes both internal and external users.

    User's image

    Note that if the link type is set to "People with existing access" or "Specific people", you will not be able to see the link in the "Share" dialog box unless you are the owner of the link. In this case, you will need to ask the owner of the link to provide you with the link and then follow steps 4-7 to see the users who have access to 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.