Web.CreateAnonymousLinkWithExpiration - Méthode
Create an anonymous link which can be used to access a document without needing to authenticate.
Espace de noms : Microsoft.SharePoint.Client
Assemblys : Microsoft.SharePoint.Client.Silverlight (dans Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client.Phone (dans Microsoft.SharePoint.Client.Phone.dll) Microsoft.SharePoint.Client (dans Microsoft.SharePoint.Client.dll)
Syntaxe
'Déclaration
Public Shared Function CreateAnonymousLinkWithExpiration ( _
context As ClientRuntimeContext, _
url As String, _
isEditLink As Boolean, _
expirationString As String _
) As ClientResult(Of String)
'Utilisation
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
)
Paramètres
- context
Type : Microsoft.SharePoint.Client.ClientRuntimeContext
url
Type : System.StringThe URL of the document in SharePoint.
isEditLink
Type : System.BooleanIf true, the link will allow the guest user edit privileges on the item.
expirationString
Type : System.StringA 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.
Valeur renvoyée
Type : Microsoft.SharePoint.Client.ClientResult<String>
The string for the anonymous link.
Remarques
For more information, see External sharing API for SharePoint and OneDrive for Business.