I am using graph onenote API to download an onenote resource with the following uri:
'https://graph.microsoft.com/v1.0/sites/microsoft.sharepoint.com,d4a24c1a-adb9-4906-90bf-c9c0e8786872,9b832d0a-7386-401f-bea2-115fd5461cf4/onenote/resources/<resource id>
and got ServiceException of error:
"{\r\n \"error\": {\r\n \"code\": \"20102\",\r\n \"message\": \"The specified resource ID does not exist.\",\r\n \"innerError\": {\r\n \"date\": \"2021-01-15T23:26:19\",\r\n \"request-id\": \"49395dbd-d437-48e0-9ed9-a424a27e2765\",\r\n \"client-request-id\": \"49395dbd-d437-48e0-9ed9-a424a27e2765\"\r\n }\r\n }\r\n}"
However, if I copy and paste the same uri into the graph explorer, I was able to get the resource with 200. And I was able to download other resources inside the same onenote notebook as well.
Any idea what is the cause?
Thanks