I have a file that i know exists in one drive , TestFile.xlxs.It sits in the folder Folder1/SubFolder2/SubFolder 2a/. I am trying t get the fileId as follows, so i can move the file to another folder in OneDrive
https://graph.microsoft.com/v1.0/me/drive/root:/Folder1/SubFolder2/SubFolder 2a/TestFile.xlsx
but i get the error
"code": "BadRequest",
"message": "Empty Payload. JSON content expected.",
Any ideas how i can get the id of the file ?
Looks like you did POST
request instead of GET
.
GET https://graph.microsoft.com/v1.0/me/drive/root:/Folder1/SubFolder2/SubFolder 2a/TestFile.xlsx
POST
request will probably work if you add empty json into the request body.
{}