我已尝试基于新的 Microsoft Graph API v1 发送以下 HTTP 请求:
POST https://graph.microsoft.com/v1.0/groups/c694da84-3f9f-4bac-9491-c2775fc39f65/drive/items/012YPM4EKO23JQWLSNYJG2DG3ZAULBDCIS/microsoft.graph.createLink HTTP/1.1
Authorization: Bearer <access-code> (filled in with valid access token)
Host: graph.microsoft.com
Content-type: application/json
Content-Length: 53
{
"type": "edit",
"scope": "Files.ReadWrite"
}
我的网址遵循以下格式:
https://graph.microsoft.com/v1.0/groups/<group-id>/drive/items/<item-id>/microsoft.graph.createLink
我收到以下 400 错误:
HTTP/1.1 400 Bad Request
{
"error": {
"code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
"message": "The parameter scope does not exist in method createLink.",
"innerError": {
"request-id": "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
"date": "2015-11-30T23:55:56"
}
}
}
我有点困惑,因为根据以下文档(我认为是最新的),请求正文中需要范围:Microsoft Graph - 为项目创建共享链接