共用方式為


UserGroup.RemoveGroupFromRole Method

Removes the specified group from the specified role definition.

Namespace:  [UserGroup Web service]
Web service reference: http://Site/_vti_bin/UserGroup.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemoveGroupFromRole", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub RemoveGroupFromRole ( _
    roleName As String, _
    groupName As String _
)
'Usage
Dim instance As UserGroup
Dim roleName As String
Dim groupName As String

instance.RemoveGroupFromRole(roleName, _
    groupName)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemoveGroupFromRole", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void RemoveGroupFromRole(
    string roleName,
    string groupName
)

Parameters

  • roleName
    Type: System.String

    A string that contains the name of the role definition.

  • groupName
    Type: System.String

    A string that contains the name of the group.

Examples

The following code example removes a specified group from a role definition.

Dim usrgrpService As New Web_Reference_Folder_Name.UserGroup()
usrgrpService.Credentials = System.Net.CredentialCache.DefaultCredentials

usrgrpService.RemoveGroupFromRole("Role_Definition", "Group")
Web_Reference_Folder_Name.UserGroup usrgrpService = new Web_Reference_Folder_Name.UserGroup();
usrgrpService.Credentials= System.Net.CredentialCache.DefaultCredentials;

usrgrpService.RemoveGroupFromRole("Role_Definition","Group");

See Also

Reference

UserGroup Class

UserGroup Members

UserGroup Web Service