RoleProxy UpdateUserRoles Method (String,  String ) CelloSaaS API Documentation
This method is used to update user roles. New role Identifier for user then insert role to user. Previous user role is not available in the current list then remove role from user.

Namespace: CelloSaaS.BusinessEdition.ServiceProxies.AccessControlManagement
Assembly: CelloSaaS.BusinessEdition (in CelloSaaS.BusinessEdition.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax

public static void UpdateUserRoles(
	string userIdentifier,
	string[] roleIdentifiers
)

Parameters

userIdentifier
Type: System String
User Identifier(Mandatory)
roleIdentifiers
Type:  System String 
Role Identifiers(Mandatory)
Exceptions

ExceptionCondition
[!:CelloSaaS.ServiceContracts.AccessControlManagement.RoleException]If db exception ocurs
System UnauthorizedAccessExceptionIncase of no permission to update the user roles
System ArgumentNullExceptionIf role id or user id is null
Examples

public void UpdateUserRoles()
{
    string userIdentifier = "3398F837-B988-4708-999D-D3DFE11875B3";
    string[] roleIdentifiers = new string[] {"GR$Tenant_Admin", "GR$Product_Admin"};
    RoleProxy.UpdateUserRoles(userIdentifier, roleIdentifiers);
}
See Also