We have a requirement to retrieve all sharing links from particular document of document library via SharePoint CSOM C#. We are able to get Anonymous sharing links and Organization Sharing links using below piece of code:

var sharingInfo = ObjectSharingInformation.GetObjectSharingInformation(clientContext, listItem, false, true, false, true, true, true, true);                

// Getting Anonymous Edit Link from sharing object  
string anonymousEditLink = sharingInfo.AnonymousEditLink;

// Getting Anonymous View Link from sharing object  
string anonymousViewLink = sharingInfo.AnonymousViewLink;

if (sharingInfo != null && sharingInfo.SharingLinks != null)
    // Looping all sharing links from ObjectSharingInformation  
    foreach (SharingLinkInfo sharingLinkInfo in sharingInfo.SharingLinks)
            if (!string.IsNullOrEmpty(sharingLinkInfo.Url))
                Console.WriteLine("URL: {0}", sharingLinkInfo.Url.ToString());

But with above code, I'm not able to get these Specific People type sharing links from the list item via CSOM C# as shown in below image: enter image description here enter image description here

Please provide me some guidance to get these type of Sharing links using CSOM C# code.

1 Answer 1


Specific People type is also known as Flexible sharing link.

We can get sharing links related information for documents from Sharing Links list. Please see this answer I added here: How to get Shared by and Shared To properties of Sharing links from a document from SharePoint Online using CSOM C#

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.