Error creating createUploadSession on OneDrive api chart for special AppFolder

I am trying to create a download session in a special application folder for my OneDrive application using the Graph API. My application has the following permissions:

Files.ReadWrite Files.ReadWrite.AppFolder offline_access

The request looks like this: https://graph.microsoft.com/v1.0/users/xxxxxx96-2e02-4300-8ab0-a05d73xxxxxx/drive/special/approot:/documentname.docx:/createUploadSession

gives the following error: {"error": {"code": "itemNotFound", "message": "Resource not found.", "innerError": {"request-id": "7447aa01-6685-4af0-998a-64abc9b14825 "," date ":" 2017-04-06T10: 07: 46 "}}}

I can create a boot session in a regular root folder without any 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 ":" ....... "}

+4
source share
1 answer

The method createuploadsessiondoes not support special/approot. As mentioned in the documentation , these are the only ways to use:
POST /drive/root:/{path_to_item}:/createUploadSession POST /drive/items/{parent_item_id}:/{filename}:/createUploadSession

0

Source: https://habr.com/ru/post/1674189/


All Articles