How should I apply the odata_nextlink when getting data from Microsoft Graph?
Question

When I call the GetUsers REST API method for Microsoft Graph, I only get the first 100 users. The odata_nextLink is returned but how should I apply this odata_nextLink in the OutSystems REST API?

Solution

Found the mistake... When  extracting the skiptoken from the nextLink I forgot to put in ignoreCase: True in the Index function... Now it works fine.

mvp_badge
MVP

Could you edit your original post and select the forge component you use?

Hi Daniel,

I am not using a forge component here. I am creating my own REST API methods for Microsoft Graph.

mvp_badge
MVP

So your question is about Microsoft graph, not OutSystems?

Hi Eric

I have not much idea about this one but please have a look if this component can help you: https://www.outsystems.com/forge/component-overview/5552/microsoft-graph-connector 


Thank you. 

Hi Manish,

I did but this component seems to ignore the fact that there can be more than 100 records to be retrieve. I tested it and it doesn’t work. 

Hello @Eric Kuijper,

Never done it myself, but per this article you can retrieve the next page of results by sending the URL value of the @odata.nextLink property to Microsoft Graph.

Regards,

AJ


Hi AJ,

Exactly this is what I am now trying. For some reason I can’t get the code to work. I have updated my REST API to include an optional skiptoken parameter.  The server action that is calling the method checks whether the nextLink is non-empty and then extracts the skiptoken. Doesn’t work yet. 

Solution

Found the mistake... When  extracting the skiptoken from the nextLink I forgot to put in ignoreCase: True in the Index function... Now it works fine.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.