我正在尝试使用仅限应用的授权流程在 OneDrive 上创建文件夹或文件,请求和响应详细信息如下,
POST https://graph.microsoft.com/v1.0/drive/root/children
HTTP/1.1
Content-Type: application/json
Accept: application/json
AUTHORIZATION: Bearer <AccesToken>
Host: graph.microsoft.com
Content-Length: 39
Request Body
{"name": "Hello.docx", "file": {} }
Response:
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"error":
{
"code": "unauthenticated",
"message": "The caller is not authenticated.",
"innerError":
{
"request-id": "xxxxx-b23d-482c-xxxx-xxxxxxxx",
"date": "2016-03-11T12:49:06"
}
}
}
如果这与权限有关,您能否让我知道要设置哪个应用程序权限以便这可以工作?它甚至适用于 App-Only 授权流程吗?
任何帮助,将不胜感激。