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

ExternalSharingExtensions.ShareSite Method

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

Share site for a person using just email. Will resolve needed people picker JSON value automatically.

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

Syntax

public static SharingResult ShareSite(this Web web, String email, Group group, Boolean sendEmail = True, String emailBody = "Site shared for you.")

Parameters

web

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

email

  Type: System.String
  Email of the person to whom site should be shared.

group

  Type: Microsoft.SharePoint.Client.Group
  Group to invite the external user to

(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.

Return Value

Type: SharingResult

See also

© 2018 Microsoft