Duplicate user in paged API calls

m_dean
Community Novice

We make use of the Canvas API to list all users. I use the link HTTP header to run through the list of pages to call. I have had a problem with the following GET requests:

https://ucbirmingham.test.instructure.com/api/v1/accounts/1/users?include[]=email&page=39&per_page=1... 

https://ucbirmingham.test.instructure.com/api/v1/accounts/1/users?include[]=email&page=40&per_page=1...

The same user appears at the end of page 39 and then at the start of page 40.

The user details are the same (I have obfuscated the example due to it being student details):

{
   "id": 5041,
   "name": "[NAME]",
   "sortable_name": "[NAME]",
   "short_name": "[NAME]",
   "sis_user_id": "[GUID]",
   "integration_id": "[STUDENT_ID]",
   "sis_login_id": "[STUDENT_ID]",
   "sis_import_id": null,
   "login_id": "[STUDENT_ID]",
   "email": "[EMAIL ADDRESS]"

}

Has anyone else seen this happening? I add the users into a C# Dictionary by the login details, which of course is causing a problem if the user has already been output once.