Get user counts in the given roles
Namespace: CelloSaaS.ServiceContracts.AccessControlManagementAssembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
Parameters
- roleIds
- Type: System String
Role Ids(Mandatory)
- tenantCode
- Type: System String
Tenant Code(Mandatory)
Return Value
Type: Dictionary String, Dictionary Int32, Int32Number of Active and Inactive users in the given roles
Exceptions
Exception | Condition |
---|---|
CelloSaaS.ServiceContracts.AccessControlManagement RoleException | If db exception occurs |
System ArgumentNullException | If tenant code or role ids are null or empty. |
Examples
public void GetUsersCountByRoleIds() { string[] roleIds = new string[] {"GR$Tenant_Admin", "GR$Product_Admin"}; string tenantCode = "B590CD25-3093-DF11-8DEB-001EC9DAB123"; IRoleService roleService = ServiceLocator.Resolve>IRoleService<(); Dictionary<string, Dictionary<int, int>> userCounts = roleService.GetUsersCountByRoleIds(roleIds, tenantCode); }
See Also