Assign many roles to the given user
Namespace: CelloSaaS.BusinessEdition.ServiceProxies.AccessControlManagementAssembly: CelloSaaS.BusinessEdition (in CelloSaaS.BusinessEdition.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
Parameters
- userIdentifier
- Type: System String
The user identifier.
- roleIdentifiers
- Type: System String
The role identifiers.
- tenantId
- Type: System String
The tenant id.
Exceptions
Exception | Condition |
---|---|
System ArgumentException | |
[!:CelloSaaS.ServiceContracts.AccessControlManagement.RoleException] | If db exception occurs |
System UnauthorizedAccessException | Incase of privilege to add user roles |
System ArgumentNullException | If 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