RoleProxy AddUserToRoles Method (String,  String , String) CelloSaaS API Documentation
Assign many roles to the given 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 AddUserToRoles(
	string userIdentifier,
	string[] roleIdentifiers,
	string tenantId
)

Parameters

userIdentifier
Type: System String
The user identifier.
roleIdentifiers
Type:  System String 
The role identifiers.
tenantId
Type: System String
The tenant id.
Exceptions

ExceptionCondition
System ArgumentException
[!:CelloSaaS.ServiceContracts.AccessControlManagement.RoleException]If db exception occurs
System UnauthorizedAccessExceptionIncase of privilege to add user roles
System ArgumentNullExceptionIf used id or tenant id or role ids is null or empty
Examples

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