RoleProxy AddUsersToRole Method CelloSaaS API Documentation
Assign many users to the given role

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 AddUsersToRole(
	string[] userIdentifiers,
	string roleIdentifier
)

Parameters

userIdentifiers
Type:  System String 
User Identifiers(Mandatory)
roleIdentifier
Type: System String
Role Identifier(Mandatory)
Exceptions

ExceptionCondition
System ArgumentException
[!:CelloSaaS.ServiceContracts.AccessControlManagement.RoleException]If db exception occur
System ArgumentNullExceptionIf the role id or user ids is null or empty.
System UnauthorizedAccessExceptionIf the user has not the privilege.
Examples

public void AddUsersToRole()
{
    string[] userIdentifiers = new string[] {"C051E882-E393-DF11-8DEB-001EC9DAB123", "C151E882-E393-DF11-8DEB-001EC9DAB123"};
    string roleIdentifier = "GR$Tenant_Admin";
    RoleProxy.AddUsersToRole(userIdentifiers, roleIdentifier);
}
See Also