Share via


SPObjectSharingInformation.GetListItemSharingInformation method

Retrieves information about the sharing state for a given list.

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

Syntax

'Declaration
Public Shared Function GetListItemSharingInformation ( _
    listID As Guid, _
    itemID As Integer, _
    excludeCurrentUser As Boolean, _
    excludeSiteAdmin As Boolean, _
    excludeSecurityGroups As Boolean, _
    retrieveAnonymousLinks As Boolean, _
    retrieveUserInfoDetails As Boolean, _
    checkForAccessRequests As Boolean _
) As SPObjectSharingInformation
'Usage
Dim listID As Guid
Dim itemID As Integer
Dim excludeCurrentUser As Boolean
Dim excludeSiteAdmin As Boolean
Dim excludeSecurityGroups As Boolean
Dim retrieveAnonymousLinks As Boolean
Dim retrieveUserInfoDetails As Boolean
Dim checkForAccessRequests As Boolean
Dim returnValue As SPObjectSharingInformation

returnValue = SPObjectSharingInformation.GetListItemSharingInformation(listID, _
    itemID, excludeCurrentUser, excludeSiteAdmin, _
    excludeSecurityGroups, retrieveAnonymousLinks, _
    retrieveUserInfoDetails, checkForAccessRequests)
public static SPObjectSharingInformation GetListItemSharingInformation(
    Guid listID,
    int itemID,
    bool excludeCurrentUser,
    bool excludeSiteAdmin,
    bool excludeSecurityGroups,
    bool retrieveAnonymousLinks,
    bool retrieveUserInfoDetails,
    bool checkForAccessRequests
)

Parameters

  • listID
    Type: System.Guid

    The list identifier for the list that contains the list item for which the sharing state is requested.

  • itemID
    Type: System.Int32

    The list item identifier for the list item for which the sharing state is requested.

  • excludeCurrentUser
    Type: System.Boolean

    Specifies whether the returned sharing state information will exclude information about the user making the request.

  • excludeSiteAdmin
    Type: System.Boolean

    Specifies whether the returned sharing state information will exclude information about users who are site collection administrators of the site collection which contains the list.

  • excludeSecurityGroups
    Type: System.Boolean

    Specifies whether the returned sharing state information will exclude information about security groups which have permissions to the list item.

  • retrieveAnonymousLinks
    Type: System.Boolean

    Specifies whether the returned sharing state information will contain information about a URL that allows an anonymous user to access the list item.

  • retrieveUserInfoDetails
    Type: System.Boolean

    Specifies whether the returned sharing state information will contain basic or detailed information about the users with permissions to the list item.

  • checkForAccessRequests
    Type: System.Boolean

    Specifies whether the returned sharing state information will contain a URL to a location that describes any access requests present in the site, if such a URL is available.

Return value

Type: Microsoft.SharePoint.SPObjectSharingInformation
The object that contains the sharing information.

See also

Reference

SPObjectSharingInformation class

SPObjectSharingInformation members

Microsoft.SharePoint namespace