Is it possible to copy a shared folder to my own profile in OneDrive Business via Microsoft Graph API?
Both accounts are OneDrive Business Accounts. Account A shares a folder to Account B. Account B is logged in and can see all shared items from Account A. So Far so good.
How can I copy this shared folder to the profile of Account B?
When I try this POST I get a 401 - The caller is not authenticated.
POST https://graph.microsoft.com/v1.0/drives/<remoteItem.driveId>/items/<id>/copy
Content-Type: application/json
Authorization: Bearer xyz...
{
"parentReference": {
"path": "/drive/root:/Documents"
}
}
The scope I use is:
- mail.read
- user.read
- files.read
- files.read.all
- sites.read.all
- files.readwrite
Any suggestions?