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

ExternalSharingExtensions.CreateAnonymousLinkForDocument Method

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

Creates anonymous link to given document. See MSDN

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

Syntax

public static string CreateAnonymousLinkForDocument(this Web web, String urlToDocument, ExternalSharingDocumentOption shareOption)

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

shareOption

  Type: Microsoft.SharePoint.Client.ExternalSharingDocumentOption
  Type of the link to be created - View or Edit

Return Value

Type: string
Anonymous URL to the file as string

See also

© 2018 Microsoft