Error when createUploadSession on OneDrive graph api for the special AppFolder -
i attempting create upload session in special app folder onedrive app using graph api. app have following permissions:
files.readwrite files.readwrite.appfolder offline_access
the request looks https://graph.microsoft.com/v1.0/users/xxxxxx96-2e02-4300-8ab0-a05d73xxxxxx/drive/special/approot:/documentname.docx:/createuploadsession
gives following error: { "error": { "code": "itemnotfound", "message": "the resource not found.", "innererror": { "request-id": "7447aa01-6685-4af0-998a-64abc9b14825", "date": "2017-04-06t10:07:46" } } }
i can create upload session on normal root folder without errors:
graph.microsoft.com/v1.0/users/xxxxxx96-2e02-4300-8ab0-a05d73xxxxxx/drive/root:/documentname.docx:/createuploadsession
result: { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.uploadsession", "expirationdatetime": "2017-04-06t10:32:48.5252565z", "nextexpectedranges": [ "0-" ], "uploadurl": "......." }
the createuploadsession
method not support special/approot
. mentioned in documentation, these paths use:
post /drive/root:/{path_to_item}:/createuploadsession post /drive/items/{parent_item_id}:/{filename}:/createuploadsession
Comments
Post a Comment