"One of the provided arguments is not acceptable" 发送分享邀请时

"One of the provided arguments is not acceptable" when Sending a sharing invitation

遵循本指南:

http://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/item_invite

我执行以下 post 请求:

POST /v1.0/me/drive/items/01OL4PFB56Y2GOVW7725BZO354PWSELRRZ/invite 

Accept: */*
Accept-Encoding: gzip, deflate
Content-Type: application/json
Authorization: Bearer eyJ0e....
Accept-Language: es-es

{
  "recipients": [
    {
      "email": "a-real-email@at-a-office365-account.com"
    }
  ],
  "message": "Here's the file that we're collaborating on.",
  "requireSignIn": true,
  "sendInvitation": true,
  "roles": [ "edit" ]
}

我得到了这个响应代码:

{
    "error": {
        "code": "invalidRequest",
        "message": "One of the provided arguments is not acceptable.",
        "innerError": {
            "request-id": "37c754c4-ace7-4582-9c6a-171633d1e335",
            "date": "2016-09-29T10:17:18"
        }
    }
}

这只是文档中的示例,但我尝试使用不同的电子邮件值、删除消息、sendInvitation=false,我得到了同样的错误。我不明白哪个论点不正确。

更新 1:

将 'edit' 更改为 'write' 后,出现此错误:

{
  "error": {
    "code": "notAllowed",
    "message": "The action is not allowed by the system.",
    "innerError": {
      "request-id": "644408df-05f6-4406-9503-b5c16da17976",
      "date": "2016-09-30T12:09:02"
    }
  }
}

角色应该是 write 而不是 edit -- 看起来我们在文档中有一个错误。感谢您指出了这一点!我们会修好它。