Microsoft.Graph.createLink:未指定版本400

时间:2016-02-17 16:11:42

标签: microsoft-graph azure-ad-graph-api

我尝试使用Microsoft.Graph.CreateLink action为OneDrive项目创建共享链接:

POST https://graph.microsoft.com/v1.0/me/drive/items/01B642VZR4QM6MX36HGZELNLHCFGY26JJ6/Microsoft.Graph.createLink HTTP/1.1
Authorization: Bearer {access_token}
Content-Type: application/json

{
    "type":"edit"
}

我收到以下错误:

HTTP/1.1 400 Bad Request

{
    "error": {
        "code": "BadRequest",
        "message": "Version not specified.",
        "innerError": {
            "request-id": "3ca90464-3910-49e1-92f2-3a9daa822944",
            "date": "2016-02-17T15:56:16"
        }
    }
}

方法说明或metadata不包含除API端点以外所需版本的任何信息。

1 个答案:

答案 0 :(得分:0)

从request-id对应的日志:3ca90464-3910-49e1-92f2-3a9daa822944,服务收到的请求是“POST https://graph.microsoft.com/”。请求URL中缺少路径段导致此预期错误。你能再次检查一下请求吗?