Method | Description | |
---|---|---|
CreateAnonymousLinkForDocument ( this web, string urlToDocument, ExternalSharingDocumentOption shareOption ) : string |
Creates anonymous link to given document. See MSDN
|
|
CreateAnonymousLinkWithExpirationForDocument ( this web, string urlToDocument, ExternalSharingDocumentOption shareOption, System.DateTime expireTime ) : string |
Creates anonymous link to the given document with automatic expiration time. See MSDN
|
|
GetObjectSharingSettingsForDocument ( this web, string urlToDocument, bool useSimplifiedPolicies = true ) : ObjectSharingSettings |
Get current sharing settings for document and load list of users it has been shared automatically.
|
|
GetObjectSharingSettingsForSite ( this web, bool useSimplifiedPolicies = true ) : ObjectSharingSettings |
Get current sharing settings for site and load list of users it has been shared automatically.
|
|
InviteExternalUser ( this group, string email, bool sendEmail = true, string emailBody = "Site shared with you." ) : SharingResult |
Invites an external user as a group member
|
|
ResolvePeoplePickerValueForEmail ( this web, string emailAddress ) : string |
Can be used to get needed people picker search result value for given email account. See MSDN
|
|
ShareDocument ( this web, string urlToDocument, string targetEmailToShare, ExternalSharingDocumentOption shareOption, bool sendEmail = true, string emailBody = "Document shared", bool useSimplifiedRoles = true ) : SharingResult |
Abstracted methid for sharing documents just with given email address.
|
|
ShareDocumentWithPeoplePickerValue ( this web, string urlToDocument, string peoplePickerInput, ExternalSharingDocumentOption shareOption, bool sendEmail = true, string emailBody = "Document shared for you.", bool useSimplifiedRoles = true ) : SharingResult |
Share document with complex JSON string value.
|
|
ShareSite ( this web, string email, ExternalSharingSiteOption shareOption, bool sendEmail = true, string emailBody = "Site shared for you.", bool useSimplifiedRoles = true ) : SharingResult |
Share site for a person using just email. Will resolve needed people picker JSON value automatically.
|
|
ShareSite ( this web, string email, Group group, bool sendEmail = true, string emailBody = "Site shared for you." ) : SharingResult |
Share site for a person using just email. Will resolve needed people picker JSON value automatically.
|
|
ShareSiteWithPeoplePickerValue ( this web, string peoplePickerInput, ExternalSharingSiteOption shareOption, bool sendEmail = true, string emailBody = "Site shared for you.", bool useSimplifiedRoles = true ) : SharingResult |
Share site for a person using complex JSON object for people picker value.
|
|
ShareSiteWithPeoplePickerValue ( this web, string peoplePickerInput, Group group, bool sendEmail = true, string emailBody = "Site shared for you." ) : SharingResult |
Share site for a person using complex JSON object for people picker value.
|
|
UnshareDocument ( this web, string urlToDocument ) : SharingResult |
Can be used to programatically to unshare any document with the document URL.
|
Method | Description | |
---|---|---|
SolveGroupIdToShare ( Web web, ExternalSharingSiteOption shareOption ) : int |
Used to solve right group ID to assign user into - used for the site level sharing.
|
public static CreateAnonymousLinkForDocument ( this web, string urlToDocument, ExternalSharingDocumentOption shareOption ) : string | ||
web | this | Web for the context used for people picker search |
urlToDocument | string | Full URL to the file which is shared |
shareOption | ExternalSharingDocumentOption | Type of the link to be created - View or Edit |
return | string |
public static CreateAnonymousLinkWithExpirationForDocument ( this web, string urlToDocument, ExternalSharingDocumentOption shareOption, System.DateTime expireTime ) : string | ||
web | this | Web for the context used for people picker search |
urlToDocument | string | Full URL to the file which is shared |
shareOption | ExternalSharingDocumentOption | Type of the link to be created - View or Edit |
expireTime | System.DateTime | Date time for link expiration - will be converted to ISO 8601 format automatically |
return | string |
public static GetObjectSharingSettingsForDocument ( this web, string urlToDocument, bool useSimplifiedPolicies = true ) : ObjectSharingSettings | ||
web | this | Web for the context |
urlToDocument | string | |
useSimplifiedPolicies | bool | |
return | ObjectSharingSettings |
public static GetObjectSharingSettingsForSite ( this web, bool useSimplifiedPolicies = true ) : ObjectSharingSettings | ||
web | this | Web for the context |
useSimplifiedPolicies | bool | |
return | ObjectSharingSettings |
public static InviteExternalUser ( this group, string email, bool sendEmail = true, string emailBody = "Site shared with you." ) : SharingResult | ||
group | this | Group to add the user to |
string | The email address of the external user | |
sendEmail | bool | Should we send an email to the given address |
emailBody | string | Text to be added to the email |
return | SharingResult |
public static ResolvePeoplePickerValueForEmail ( this web, string emailAddress ) : string | ||
web | this | Web for the context used for people picker search |
emailAddress | string | Email address to be used as the query parameter. Should be pointing to unique person which is then searched using people picker capability programatically. |
return | string |
public static ShareDocument ( this web, string urlToDocument, string targetEmailToShare, ExternalSharingDocumentOption shareOption, bool sendEmail = true, string emailBody = "Document shared", bool useSimplifiedRoles = true ) : SharingResult | ||
web | this | Web for the context used for people picker search |
urlToDocument | string | Full URL to the file which is shared |
targetEmailToShare | string | Email address for the person to whom the document will be shared |
shareOption | ExternalSharingDocumentOption | View or Edit option |
sendEmail | bool | Send email or not |
emailBody | string | Text attached to the email sent for the person to whom the document is shared |
useSimplifiedRoles | bool | Boolean value indicating whether to use the SharePoint simplified roles (Edit, View) |
return | SharingResult |
public static ShareDocumentWithPeoplePickerValue ( this web, string urlToDocument, string peoplePickerInput, ExternalSharingDocumentOption shareOption, bool sendEmail = true, string emailBody = "Document shared for you.", bool useSimplifiedRoles = true ) : SharingResult | ||
web | this | Web for the context used for people picker search |
urlToDocument | string | Full URL to the file which is shared |
peoplePickerInput | string | People picker JSON string value containing the target person information |
shareOption | ExternalSharingDocumentOption | View or Edit option |
sendEmail | bool | Send email or not |
emailBody | string | Text attached to the email sent for the person to whom the document is shared |
useSimplifiedRoles | bool | Boolean value indicating whether to use the SharePoint simplified roles (Edit, View) |
return | SharingResult |
public static ShareSite ( this web, string email, ExternalSharingSiteOption shareOption, bool sendEmail = true, string emailBody = "Site shared for you.", bool useSimplifiedRoles = true ) : SharingResult | ||
web | this | Web for the context of the site to be shared. |
string | Email of the person to whom site should be shared. | |
shareOption | ExternalSharingSiteOption | Sharing style - View, Edit, Owner |
sendEmail | bool | Should we send email for the given address. |
emailBody | string | Text to be added on share email sent to receiver. |
useSimplifiedRoles | bool | Boolean value indicating whether to use the SharePoint simplified roles (Edit, View) |
return | SharingResult |
public static ShareSite ( this web, string email, Group group, bool sendEmail = true, string emailBody = "Site shared for you." ) : SharingResult | ||
web | this | Web for the context of the site to be shared. |
string | Email of the person to whom site should be shared. | |
group | Group | Group to invite the external user to |
sendEmail | bool | Should we send email for the given address. |
emailBody | string | Text to be added on share email sent to receiver. |
return | SharingResult |
public static ShareSiteWithPeoplePickerValue ( this web, string peoplePickerInput, ExternalSharingSiteOption shareOption, bool sendEmail = true, string emailBody = "Site shared for you.", bool useSimplifiedRoles = true ) : SharingResult | ||
web | this | Web for the context of the site to be shared. |
peoplePickerInput | string | JSON object with the people picker value |
shareOption | ExternalSharingSiteOption | Sharing style - View, Edit, Owner |
sendEmail | bool | Should we send email for the given address. |
emailBody | string | Text to be added on share email sent to receiver. |
useSimplifiedRoles | bool | Boolean value indicating whether to use the SharePoint simplified roles (Edit, View) |
return | SharingResult |
public static ShareSiteWithPeoplePickerValue ( this web, string peoplePickerInput, Group group, bool sendEmail = true, string emailBody = "Site shared for you." ) : SharingResult | ||
web | this | Web for the context of the site to be shared. |
peoplePickerInput | string | JSON object with the people picker value |
group | Group | The group to invite the user to |
sendEmail | bool | Should we send email for the given address. |
emailBody | string | Text to be added on share email sent to receiver. |
return | SharingResult |
public static UnshareDocument ( this web, string urlToDocument ) : SharingResult | ||
web | this | Web for the context used for people picker search |
urlToDocument | string | Full URL to the file which is shared |
return | SharingResult |