Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

API Poller Templates for Microsoft 365 Don't Support Pagination

SAM Version: 2020.2.1

From what I can tell, the new Microsoft 365 API Poller templates included in 2020.2.1 do not support the Microsoft API pagination mechanism of following the link provided in @odata.nextLink.  As a result, the API Pollers only return the first page of results.

How can we get the API Pollers to follow the pagination links?

Labels (3)
Tags (3)
5 Replies
Level 10

@kbswcon I think the only option (except adding a request manually) will be following solution:

1. Click the monitor icon on the right - next to @odata.nextLink element

2. Change "How should we store this value?" to "Use as a variable in subsequent request", set "variable name" to e.g. "nextLink" and click save

3. In the next request (you could create it by clicking [3 dots] -> Duplicate) use the following macro for Request URL: ${nextLink}

That will allow you to use the URL that was provided in @odata.nextLink

Let us know if that works for you.





This actually won't work as you don't know how many pages there are for the return.  So what we need in the API Poller feature is that supports looping until that next page link is no longer part of the response.  That's the way the Microsoft API's have worked for many years now.

0 Kudos

@kbswcon OK. Please tell me more about your use case. What metrics do you need to collect?

0 Kudos


I'll give you two examples of existing API Poller templates included with 2020.2.1 that provide incomplete results due to this limitation.

The Microsoft 365 Exchange Mailboxes template provides an inaccurate count for "All Mailboxes Count" because it is only considering the first page of results.

The Microsoft 365 Group Statistics template provides inaccurate metrics for all group counters because it is only considering the first page of results for each.

I'm sure you can see the picture here. 🙂

0 Kudos

Thanks, that make sense. I'm asking because there might be easier solutions to achieve the goal than call the API in a recurrent way.

Feature request for that need:


0 Kudos