web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 5JSOXEnxQo0YgOP7xJn60e
Power Automate - General Discussion
Unanswered

how to get the Azure DevOps Connector to return multiple pages when querying users

Like (0) ShareShare
ReportReport
Posted on 13 Apr 2020 10:47:22 by

When using the Azure DevOps Connector in Microsoft flow to query the ADO api users. It only returns 500 users. How can I get it to return the all of the users?

 

flow.JPG

 

I think I need it to pass back in the continuationToken in the header and return the next page of results. but it doesnt give no default way of doing this.

 

Does anyone know how to get the full set of results back? It only returns a subset.

 

Thanks

  • yashag2255 Profile Picture
    24,647 Super User 2024 Season 1 on 14 Apr 2020 at 04:28:46
    Re: how to get the Azure DevOps Connector to return multiple pages when querying users

    Hi @Anonymous / @InnComing 

     

    Yes. You can intialize an integer variable and add the number of users in the org to the value of this variable. Now, add a do until action and then set it to run until this variable value is less than 0. 

     

    Intialize another variable to store the continuation string and then check if that string is empty then do send a request without that and once the request is sent, set the variable to that string. when the string has value, send the request with the string to get the next set of users and after this again add the set variable action to set the new continuation string. Remember to add an increment variable action after every http request and select the first variable you initialized and for the increment value type in -500 (as you have confirmed that it returns 500 users. you can also use the length function to check the number of users returned from the previous action and subtract that from the primary variable)

     

    The loop will run until the number of users are returned as specified in the variable. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    on 13 Apr 2020 at 21:28:44
    Re: how to get the Azure DevOps Connector to return multiple pages when querying users

    we have like over 10,000 users. I don't want to run the http action 10 times. Do you know how to do a while loop in power automate? e.g.

    while continuation != 'null' keep returning users until it returns all users. 

     

    many thanks!!

  • yashag2255 Profile Picture
    24,647 Super User 2024 Season 1 on 13 Apr 2020 at 11:22:18
    Re: how to get the Azure DevOps Connector to return multiple pages when querying users

    Hi @InnComing 

     

    As per the API documentation, the list users also returns a continuation string that can be passed further in another http action to get the next set of users: https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/users/list?view=azure-devops-rest-5.1

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2