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
  • Like most List() methods, the PageSize and PageIndex options are parameters. Page size defaults to 20. You can increase it to a maximum of 100. The results indicate the number of total records, so you can iterate more pages. This is generally consistent across all listing APIs whether accessed through REST, in-process, or the scripting API.

    User list get options UsersListOptions is defined in the Telligent.Evolution.Extensibility.Api.Version1 namespace of Telligent.Evolution.Platform.dll Definition class UsersListOptions { string AccountStatus…
    Last edited in Verint Community 11.x > API Documentation

  • 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

  • First as was mentioned previously, you will never receive more than 100 users and your code does not page the results.  Second, no there is no way to filter based on attribute outside of getting a list and doing so programmatically similar to your approach.  

    If you are still having issues I mat suggest engaging our professional services organization.

Reply Children
No Data