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("http://schemas.microsoft.com/sharepoint/soap/directory/RemoveGroupFromRole", RequestNamespace := "http://schemas.microsoft.com/sharepoint/soap/directory/",  _
    ResponseNamespace := "http://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("http://schemas.microsoft.com/sharepoint/soap/directory/RemoveGroupFromRole", RequestNamespace = "http://schemas.microsoft.com/sharepoint/soap/directory/", 
    ResponseNamespace = "http://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