Compartilhar via


Group.DeleteSiteCollectionAccess Method

Removes site collection access to local site collection group.

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

Syntax

'Declaration
Public Sub DeleteSiteCollectionAccess ( _
    siteCollectionId As Guid _
)
'Usage
Dim instance As Group
Dim siteCollectionId As Guid

instance.DeleteSiteCollectionAccess(siteCollectionId)
public void DeleteSiteCollectionAccess(
    Guid siteCollectionId
)

Parameters

  • siteCollectionId
    Type: System.Guid

    The ID property for the SPSite object that should have access removed for the group.

Exceptions

Exception Condition
UnauthorizedAccessException

The current user has insufficient permissions to perform this operation.

Remarks

In order for a site collection to access its local group, it needs to be added to the group. This method removes the requested site collection from the list that can access this group.If the group is not a site collection group, this method has no effect. The current user must have TaxonomyRights.ManageTermStore permission in order to use this method.

Examples

public void DeleteSiteCollectionAccess(Guid siteCollectionId)

See Also

Reference

Group Class

Group Members

Microsoft.SharePoint.Taxonomy Namespace

[M:Microsoft.SharePoint.Taxonomy.TermStore.CommitAll()]

IsSiteCollectionGroup

AddSiteCollectionAccess()

SiteCollectionAccessIds