How can get all user list through plugin

Hi i am using below code to get user list 

Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.Users>().List(new UsersListOptions() {  }); it is only returning 20 records how ca i get full record or can appply filter for ExtendedAttributes

but it is only returning 20 records i want either all users or can apply filter by extendedattributes into alll user list

Parents Reply
  • Hi Thanks For your reply,

    i need to filter  all user list on behalf of some extended attribute value, to achieve the filter list i have written below code

    var user = Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.Users>().List(new UsersListOptions() { });
    if (user != null)
    {
    int totalcount = user.TotalCount;
    user = Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.Users>().List(new UsersListOptions() { SortBy = "JoinedDate", SortOrder = "Descending" , PageSize = totalcount });
    }

    now i am filtering the user on behalf of extended attribute by below code 

    var list = userList.Where(x => x.ExtendedAttributes.Any(z => z.Key == "ABC")
    && x.ExtendedAttributes.Where(l => l.Key == "ABC").Select(n => Convert.ToBoolean(n.Value)).FirstOrDefault() == true);

    its taking too much , id there any best approach to fulfill the sam erequirement

Children
No Data