IRoleService GetUsersCountByRoleIds Method CelloSaaS API Documentation
Get user counts in the given roles

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

Dictionary<string, Dictionary<int, int>> GetUsersCountByRoleIds(
	string[] roleIds,
	string tenantCode
)

Parameters

roleIds
Type:  System String 
Role Ids(Mandatory)
tenantCode
Type: System String
Tenant Code(Mandatory)

Return Value

Type: Dictionary String, Dictionary Int32, Int32  
Number of Active and Inactive users in the given roles
Exceptions

ExceptionCondition
CelloSaaS.ServiceContracts.AccessControlManagement RoleExceptionIf db exception occurs
System ArgumentNullExceptionIf 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