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

ExternalSharingExtensions.ShareSiteWithPeoplePickerValue Method

SharePoint Dev Documents|Last Updated: 6/19/2017
|
1 Contributor

Share site for a person using complex JSON object for people picker value.

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

Syntax

public static SharingResult ShareSiteWithPeoplePickerValue(this Web web, String peoplePickerInput, ExternalSharingSiteOption shareOption, Boolean sendEmail = True, String emailBody = "Site shared for you.", Boolean useSimplifiedRoles = True)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Web for the context of the site to be shared.

peoplePickerInput

  Type: System.String
  JSON object with the people picker value

shareOption

  Type: Microsoft.SharePoint.Client.ExternalSharingSiteOption
  Sharing style - View, Edit, Owner

(optional) sendEmail

  Type: System.Boolean
  Should we send email for the given address.

(optional) emailBody

  Type: System.String
  Text to be added on share email sent to receiver.

(optional) useSimplifiedRoles

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

Return Value

Type: SharingResult
A SharingResult object

See also

© 2018 Microsoft