58
Views
10
Comments
Solved
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?

UserImage.jpg
Eric Kuijper
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.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

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

UserImage.jpg
Eric Kuijper

Hi Daniel,

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

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

So your question is about Microsoft graph, not OutSystems?

2022-04-08 14-17-28
Maria J J

Hello @Daniël Kuhlmann !

I have the same problem, and I do not get where and how I should add the odata_nextLink. Should I create a new REST API -call for the nextLink? If so, how should I call this method?

If you or anyone else can help me, it would be much appreciated!

2021-05-18 02-27-17
Manish Gupta
Champion

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. 

UserImage.jpg
Eric Kuijper

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. 

2021-11-18 18-03-41
AJ.

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


UserImage.jpg
Eric Kuijper

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. 

UserImage.jpg
Eric Kuijper
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.

2022-04-08 14-17-28
Maria J J

@Eric Kuijper So in the REST API-url you just put the full URL, e.g. the last one in the picture (screenshot from the article AJ referenced)?


Eric, if you can, can you descibe how you solved this in OutSystems?

Much appreciated!

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