2017-07-14 63 views
1

对于OneDrive个人或企业,OneDrive中可能只有一个文件夹,我的应用有权访问OneDrive,而无法访问所有OneDrive。目前,我正在向用户请求访问所有Onedrive并手动设置此权限,但如果用户不是特定的OneDrive应用程序,用户通常不喜欢授予所有OneDrive的访问权限。我可以在OneDrive中创建应用程序文件夹吗?我不希望应用访问OneDrive的所有

我觉得我已经阅读了有关AppFolder权限,但我找不到支持文档或正在使用的示例。

回答

2

您正在寻找的权限是Files.ReadWrite.AppFolder,它在file permissions category中有记录。

说明:Have full access to the application's folder (preview)(Preview) Allows the app to read, create, update, and delete files in the application's folder.

一旦应用程序有此权限的访问令牌,你的应用程序文件夹位于https://graph.microsoft.com/v1.0/me/drive/special/approot/

从这一点上传,下载和列出文件就像其他任何文件夹一样。例如,使用GET https://graph.microsoft.com/v1.0/me/drive/special/approot/children完成在该文件夹中列出项目。

上传文件:

PUT https://graph.microsoft.com/v1.0/me/drive/special/approot:/foo.txt:/content

相关问题