Freigeben über


Web.CreateAnonymousLinkWithExpiration-Methode

Create an anonymous link which can be used to access a document without needing to authenticate.

Namespace:  Microsoft.SharePoint.Client
Assemblys:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (in Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Shared Function CreateAnonymousLinkWithExpiration ( _
    context As ClientRuntimeContext, _
    url As String, _
    isEditLink As Boolean, _
    expirationString As String _
) As ClientResult(Of String)
'Usage
Dim context As ClientRuntimeContext
Dim url As String
Dim isEditLink As Boolean
Dim expirationString As String
Dim returnValue As ClientResult(Of String)

returnValue = Web.CreateAnonymousLinkWithExpiration(context, _
    url, isEditLink, expirationString)
public static ClientResult<string> CreateAnonymousLinkWithExpiration(
    ClientRuntimeContext context,
    string url,
    bool isEditLink,
    string expirationString
)

Parameter

  • isEditLink
    Typ: System.Boolean

    If true, the link will allow the guest user edit privileges on the item.

  • expirationString
    Typ: System.String

    A date/time string that conforms to the ISO 8601:2004(E) complete representation for calendar date and time of day and which represents the time and date of expiry for the anonymous link. Both the minutes and hour value must be specified for the difference between the local and UTC time. Midnight is represented as 00:00:00. For example:

    • YYYYMMDDThhmmssZ

    • YYYYMMDDThhmmss±hhmm

    • YYYYMMDDThhmmss±hh:mm

    • YYYY-MM-DDThh:mm:ssZ

    • YYYY-MM-DDThh:mm:ss±hh:mm

    • YYYY-MM-DDThh:mm:ss±hhmm

    • A null value indicates no expiry.

Rückgabewert

Typ: Microsoft.SharePoint.Client.ClientResult<String>
The string for the anonymous link.

Hinweise

For more information, see External sharing API for SharePoint and OneDrive for Business.

Siehe auch

Referenz

Web Klasse

Web-Member

Microsoft.SharePoint.Client-Namespace