Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Changing a Role Name

Changing a Role Name

The Backend Services .NET SDK allows you to change the name of an existing role from any .NET based application. The operation requires Master Key authentication.

To change a role name you need to execute the following code snippet:

public async Task<bool> UpdateRoleByIdAsync(Guid applicationId, Guid roleId, string roleName, string masterKey)
{
    var metadata = new EverliveAccount(new EverliveAccountSettings(AuthorizationStrategy.MasterKey, masterKey));
    var updateObject = new Role()
    {
        Name = roleName
    };
    return await metadata.WorkWith().Application(applicationId).Roles().Update(roleId, updateObject).ExecuteAsync();
}

On success, you receive the following response:

STATUS 200 OK
{
    "ModifiedAt": "2015-07-06T12:07:58.973Z",
    "Result": 1
}

See Also

Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.