I am able to use Microsoft API to upload file to folder shared within the same domain. For example, [email protected]
share a directory to [email protected]
, then I am able to write to the shared folder via [email protected]
.
More specifically, I am able to create an upload session using following API:
https://graph.microsoft.com/v1.0/drives/<drive_id>/items/<dir_id>:/<filename>:/createUploadSession
However, the same API would return 404
if the drive_id
and dir_id
is from user of another domain. For example, [email protected]
share folder to [email protected]
, then upload file via [email protected]
.
The error message from API is
{
"error": {
"code": "itemNotFound",
"message": "The resource could not be found.",
"innerError": {
"request-id": "526d86bc-c620-4782-a74d-c8cd8284df8b",
"date": "2018-10-19T20:54:37"
}
}
}
Is there any API that would work for OneDrive file upload to shared folder across different domains?