Using Microsoft Graph OData as source for a data grid does not succesfully apply paging

2
On my investigation on how to consume an OData service within Mendix I'm running into an issue.    I am trying to use the Microsoft Graph OData service to show users in the app. I added the users source as an external entity in my domain model and added a data grid on a page to show the users.   But when I open the page it keeps loading. When I looked into the console I saw that it wasn't just requesting the first 20 users, but that it kept retrieving the next 20 aswell! In the response body from Microsoft Graph I see that it sends the users, and also responds with an '@odata.nextlink’ property. When it retrieves the first call, the OData consume service automatically also makes a call to this nextlink endpoint. From that response, it would then go on to the nextlink again. Since there are 1000s of users, it will make a huge amount of calls in short time, trying to retrieve all these users.  What is causing this to happen, and why doesn’t the OData consume just accept the first 20 rows that are already provided in the call to MS Graph? How would I go about solving this?  
asked
1 answers
0

Hey Tim,

 

I have found most of Mendix’s OData external objects implementation is lacking often. Microsoft uses skip tokens/next page urls.

I believe Mendix wants $skip url tokens, which I don’t think Microsoft Graph API supports in many if not all cases. I don’t think there is any easy way around this sadly, but maybe I am wrong.

answered