Share via


3.2.5.143.2.2.31 ShareObject

This method is a static CSOM method.

Return Type: Microsoft.SharePoint.Client.SharingResult

This method shares an object in SharePoint such as a list item or site. It returns a SharingResult object which contains the completion script and a page to redirect to if desired.

Parameters:

url: The URL of the website with the path of an object in SharePoint query string parameters.

Type: CSOM String

peoplePickerInput: A string of JSON representing users in people picker format.

Type: CSOM String

roleValue: The sharing role value for the type of permission to grant on the object.

Type: CSOM String

groupId: The ID of the group to be added. Zero if not adding to a permissions group.

Type: CSOM Int32

propagateAcl: A flag to determine if permissions SHOULD be pushed to items with unique permissions.

Type: CSOM Boolean

sendEmail: A flag to determine if an email notification SHOULD be sent (if email is configured).

Type: CSOM Boolean

includeAnonymousLinkInEmail: If an email is being sent, this determines if an anonymous link SHOULD be added to the message.

Type: CSOM Boolean

emailSubject: The email subject.

Type: CSOM String

emailBody: The email body.

Type: CSOM String

useSimplifiedRoles: A Boolean value indicating whether to use the SharePoint simplified roles (Edit, View) or not.

Type: CSOM Boolean