进行邀请电话时获取403

时间:2019-01-30 14:59:01

标签: microsoft-graph

致电POST https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/invite
时 在Microsoft Office 365组SharePoint网站上的文件夹上,响应代码为403

如果我们在SharePoint UI中尝试相同的操作,则一切正常。

以下是回复:

{,…} 
error: {code: "accessDenied", message: "The caller does not have permission to perform the action.",…} 
code: "accessDenied" 
innerError: {request-id: "0f6b7724-ff9f-4ed6-9f78-31dcb452682e", date: "2019-01-25T09:08:00"} 
message: "The caller does not have permission to perform the action." 
{
  "error": {
    "code": "accessDenied",
    "message": "The caller does not have permission to perform the action.",
    "innerError": {
      "request-id": "0f6b7724-ff9f-4ed6-9f78-31dcb452682e",
      "date": "2019-01-25T09:08:00"
    }
  }
} 

1 个答案:

答案 0 :(得分:0)

错误告诉您被认证的用户没有共享该文件的权限,或者您在认证用户时未能请求Files.ReadWrite范围。

您必须至少获得Files.ReadWrite的同意并使用访问令牌,才能send a sharing invitation