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

  • 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 Micheal,

    I really thankful for your reply, 

    but in my case i want the user on behalf of a particular extendedattribute value with in particular time period for joiningdate, 

    if i will apply these filter this will give me data only by filtering from 100 record ,these will be wrong result,

    i first want to apply filter to get data between a particular time period of joining date from all user after the filter paging should be apply.

  • You are going to have to page the results using the page size and index provided in the response, you cannot retrieve more than 100 in a single call

  • And if you're getting this list in order to render in a UI, you should rely on user paging anyway.

  • 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

  • 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

  • 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.