Is there a programmatic way of accessing through PowerShell/CSOM to get the Edit links created for the documents

enter image description here

  • look for ObjectSharing information for list item. In that object you will get this link. SP.ObjectSharingInformation.getListItemSharingInformation – Bhaskar Dhone Aug 24 '18 at 5:41

You can use the CreateOrganizationSharingLink to get the URL of the document.

 public static ClientResult<string> CreateOrganizationSharingLink(
     ClientRuntimeContext context,
     string url,
     bool isEditLink

You need to specify the full URL of the document in the parameter.

If you want the edit link, keep the isEditLink parameter value set to true

The sample code is as below:

var docEditLink = Microsoft.SharePoint.Client.Web.CreateOrganizationSharingLink(context, 
"https://tenant-name.sharepoint.com/sites/testLibrary/Documents/test.docx", true);


var editLink = docEditLink.Value;
  • Thank you Anuja ,Presently i am trying to get an inventory report of all the documents in a site using CSOM where for each item i am reading the metadata associated with it .Is there a way that i can get the link without actually creating the edit link – Anil Aug 24 '18 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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