If you run a request specifying, for example, the $top parameter, it will fail if it needs to fetch a second page, with the following error:
microsoftgraph.exceptions.BadRequest: {'error': {'code': 'BadRequest', 'message': "Query option '$top' was specified more than
once, but it must be specified at most once.", 'innerError': {'date': '2022-02-18T23:21:56', 'request-id': 'ae804f84-62aa-4bb4-a521-8c5ad8be2ed7', 'client-request-id': 'ae804f84-62aa-4bb4-a521-8c5ad8be2ed7'}}}
The reason for this error is that, when we want to fetch the next page, we use "@odata.nextLink" as request url which already contains all query params from the original request but we still pass **kwargs to the requests.request constructor, so the values in the "params" dictionary get added again to the request, causing all request query params to be duplicated.
If you run a request specifying, for example, the $top parameter, it will fail if it needs to fetch a second page, with the following error:
The reason for this error is that, when we want to fetch the next page, we use "@odata.nextLink" as request url which already contains all query params from the original request but we still pass **kwargs to the requests.request constructor, so the values in the "params" dictionary get added again to the request, causing all request query params to be duplicated.