Share via


Web.UnshareObject method

Removes Sharing permissions on an object.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Shared Function UnshareObject ( _
    context As ClientRuntimeContext, _
    url As String _
) As SharingResult
'Usage
Dim context As ClientRuntimeContext
Dim url As String
Dim returnValue As SharingResult

returnValue = Web.UnshareObject(context, _
    url)
public static SharingResult UnshareObject(
    ClientRuntimeContext context,
    string url
)

Parameters

  • url
    Type: System.String

    The URL of the web with the path of an object in SharePoint.

Return value

Type: Microsoft.SharePoint.Client.SharingResult
A SharingResult object which contains status codes pertaining to the completion of the operation.

Remarks

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

See also

Reference

Web class

Web members

Microsoft.SharePoint.Client namespace