我正在尝试在 Drive of Teams 私人频道中创建一个文件夹。但是请求失败,403 Forbidden
因为我是该特定频道的所有者,
我也可以使用 SharePoint 网站手动创建文件夹。
要求
POST /v1.0/drives/b!43py0EBpI0asOUgEnAjaxRc2cYcM2vtIiHHa72kTXpcOCBkq9GQrQ7r0s1d0OtUD/items/013ATLYCIOMYJZSH2AZRFZBWU27JWYBIM4/children HTTP/1.1
Host: graph.microsoft.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Authorization: Bearer <snipped>
client-request-id: 30bba4ae-50da-4347-9654-256bb84739d7
Content-Type: application/json
If-Modified-Since: Mon: 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Origin: https://localhost:44349
DNT: 1
Connection: keep-alive
Referer: https://localhost:44349/web/
{"name":"2020-03-22 - Private channel","folder":{},"@microsoft.graph.conflictBehavior":"fail"}
回复
HTTP/1.1 403 Forbidden
Cache-Control: private
Content-Type: application/json
request-id: 41fa0e4c-f79a-4626-b152-2fc7e3c7cd50
client-request-id: 30bba4ae-50da-4347-9654-256bb84739d7
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"South India","Slice":"SliceC","Ring":"3","ScaleUnit":"000","RoleInstance":"AGSFE_IN_3"}}
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Location, Preference-Applied, Content-Range, request-id, client-request-id, ReadWriteConsistencyToken, SdkVersion
Strict-Transport-Security: max-age=31536000
Date: Wed, 18 Mar 2020 09:10:32 GMT
Content-Length: 256
{
"error": {
"code": "accessDenied",
"message": "The caller does not have permission to perform the action.",
"innerError": {
"request-id": "41fa0e4c-f79a-4626-b152-2fc7e3c7cd50",
"date": "2020-03-18T09:10:33"
}
}
}
更新
当我们添加Sites.ReadWrite.All
到我们的范围时它可以工作但是我们已经有了Files.ReadWrite.All
并且我们可以在其他驱动器中创建文件夹而没有任何问题