Search code examples
jsonmicrosoft-graph-apionedrive

OneDrive Delta Next Page Link Error


I'm trying to page through deltas for a OneDrive root folder, but the second page is giving me a link that returns a 400 error.

My initial request looks like this:

https://graph.microsoft.com/v1.0/drives/<drive-id>/root/microsoft.graph.delta

which returns a page of deltas and a link to the next page.

The next page link looks like this:

https://graph.microsoft.com/v1.0/drives('<drive-id>')/root/microsoft.graph.delta(token='MzslMjMzOyUyMzE7Mzs5ZmY3MzExYy0yYzRmLTQwZGMtYmVjNS0zMWI3NDXXXXXXXXXXXXXXXXXXXXk0OTMyNDMwMDAwOzkxMjY5ODk3OyUyM1BhZ2VkPVRSVUUlMjZwX0lEPTI1NTg7JTIzOyUyMzQ')

But when I make a request using that link, I get this response:

400 : Bad Request
HTTP/1.1 400 Bad Request
Transfer-Encoding : chunked
Strict-Transport-Security : max-age=31536000
Cache-Control : private
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West US","Slice":"SliceA","Ring":"4","ScaleUnit":"000","Host":"AGSFE_IN_27","ADSiteName":"WST"}}
client-request-id : 5c1d0d11-1c1f-4fa0-8c1e-ce61369402ce
Duration : 11.1016
request-id : 5c1d0d11-1c1f-4fa0-8c1e-ce61369402ce
Date : Thu, 29 Mar 2018 23:14:01 GMT
Content-Type : application/json
{
  "error": {
    "code": "BadRequest",
    "message": "Syntax error at position 160 in \u0027token\u003d\u0027MzslMjMzOyUyMzE7Mzs5ZmY3MzExYy0yYzRmLTQwZGMtYmVjNS0zMWI3NDXXXXXXXXXXXXXXXXXXXXk0OTMyNDMwMDAwOzkxMjY5ODk3OyUyM1BhZ2VkPVRSVUUlMjZwX0lEPTI1NTg7JTIzOyUyMzQ\u0027)(token\u003dnull\u0027.",
    "innerError": {
      "request-id": "5c1d0d11-1c1f-4fa0-8c1e-ce61369402ce",
      "date": "2018-03-29T23:14:01"
    }
  }
}

This looks like it's probably an internal problem, but maybe I'm doing something wrong. I've tried with both the beta and v1.0 endpoints. Am I missing something?


Solution

  • Your URI is close but not correct. The correct URI should be:

    GET /drives/{drive-id}/root/delta