UserGroup.UpdateRoleInfo Method

Updates information for 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/UpdateRoleInfo", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub UpdateRoleInfo ( _
    oldRoleName As String, _
    roleName As String, _
    description As String, _
    permissionMask As Integer _
)
'Usage
Dim instance As UserGroup
Dim oldRoleName As String
Dim roleName As String
Dim description As String
Dim permissionMask As Integer

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

Parameters

  • oldRoleName
    Type: System.String

    A string that contains the old name of the role definition.

  • roleName
    Type: System.String

    A string that contains the new name of the role definition.

  • description
    Type: System.String

    A string that contains a description of the role definition.

  • permissionMask
    Type: System.Int32

    A 32-bit integer in 0x00000000 format that represents a SPRights value and specifies new permissions for the site group. Use the pipe symbol ("|") in Visual C# or Or in Visual Basic to delimit values when creating a custom permission mask that combines permissions.

Examples

The following code example changes the name, description, and permissions for the specified role definition, giving the group permissions to view items and to view pages.

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

Dim oldName As String = "Old_Name"
Dim newName As String = "New_Name"
Dim newDescription As String = "New_Description"
Dim newPermissions As Integer = &H1 Or &H20000

usrgrpService.UpdateRoleInfo(oldName, newName, newDescription, newPermissions)
Web_Reference_Folder_Name.UserGroup usrgrpService = new Web_Reference_Folder_Name.UserGroup();
usrgrpService.Credentials= System.Net.CredentialCache.DefaultCredentials;

string oldName = "Old_Name";
string newName = "New_Name";
string newDescription = "New_Description";
int newPermissions = 0x00000001 | 0x00020000;

usrgrpService.UpdateRoleInfo(oldName, newName, newDescription, newPermissions);

See Also

Reference

UserGroup Class

UserGroup Members

UserGroup Web Service