Table of contents
TOC
Collapse the table of content
Expand the table of content

ExternalSharingExtensions.ShareDocumentWithPeoplePickerValue Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Share document with complex JSON string value.

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static SharingResult ShareDocumentWithPeoplePickerValue(this Web web, String urlToDocument, String peoplePickerInput, ExternalSharingDocumentOption shareOption, Boolean sendEmail = True, String emailBody = "Document shared for you.", Boolean useSimplifiedRoles = True)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Web for the context used for people picker search

urlToDocument

  Type: System.String
  Full URL to the file which is shared

peoplePickerInput

  Type: System.String
  People picker JSON string value containing the target person information

shareOption

  Type: Microsoft.SharePoint.Client.ExternalSharingDocumentOption
  View or Edit option

(optional) sendEmail

  Type: System.Boolean
  Send email or not

(optional) emailBody

  Type: System.String
  Text attached to the email sent for the person to whom the document is shared

(optional) useSimplifiedRoles

  Type: System.Boolean
  Boolean value indicating whether to use the SharePoint simplified roles (Edit, View)

Return Value

Type: SharingResult

See also

© 2018 Microsoft