locked
Paging in Azure AD graph client RRS feed

  • Question

  • We need a way to get users based on page index and page size so that we will not load all the users every time.

    I have gone through with the Azure Graph Client documentation here http://blogs.msdn.com/b/aadgraphteam/archive/2014/12/12/announcing-azure-ad-graph-api-client-library-2-0.aspx

    There is a way to iterate forward/backward but, i didn't found a way to get the users based on page index(i.e: i want to get users from 10-20 in the list if i pass parameters page index=2 and page size=10).

    If we go with forward/backward paging, then i have to iterate through each page to find the next set of records, which I don’t want to do that.


    Any help would be appreciated.

    • Edited by Shekar P Tuesday, July 7, 2015 9:27 AM
    Tuesday, July 7, 2015 9:25 AM

Answers

  • Sorry, currently this is not possible via the Graph Client. What you are looking for is similar to a query of a database, where you can selectively control the return set. Azure Graph does not have this capability. When you make a query, the result is returned one page at a time. You pass your token each time you are requesting the next page in the return set.  There exist no way that actually tracks page 1, 2, 3... and so forth of the return set, thus, no way to say bypass pages 1 and 2 to go directly to page 3.  The only capability available is next page and previous page. There is no page index maintained that can be queried.  You get the your results one page at a time.

    ~ Michael (MSFTE)

    Tuesday, July 7, 2015 5:11 PM

All replies

  • Hello,

    We are researching on the query and would get back to you soon on this.

    I apologize for the inconvenience and appreciate your time and patience in this matter.

    Regards,
    Neelesh
    Tuesday, July 7, 2015 1:19 PM
  • Sorry, currently this is not possible via the Graph Client. What you are looking for is similar to a query of a database, where you can selectively control the return set. Azure Graph does not have this capability. When you make a query, the result is returned one page at a time. You pass your token each time you are requesting the next page in the return set.  There exist no way that actually tracks page 1, 2, 3... and so forth of the return set, thus, no way to say bypass pages 1 and 2 to go directly to page 3.  The only capability available is next page and previous page. There is no page index maintained that can be queried.  You get the your results one page at a time.

    ~ Michael (MSFTE)

    Tuesday, July 7, 2015 5:11 PM