上次修改日期的Microsoft Graph驱动器顺序

时间:2016-11-14 15:42:14

标签: json microsoft-graph

我正在尝试使用我的查询执行两项操作:它应该获取驱动器中的所有文件,并且应该通过lastModifiedDateTime对它们进行排序。我的console.log显示以下内容:

Array[3]
0:Object
1:Object
2:Object
@microsoft.graph.downloadUrl:
"https://one365dev1.sharepoint.com/sites/Group100/_layouts/15/download.aspx?guestaccesstoken=H8k8YdpvSbJ5Os7N5wMeKsWTPlTVudH1lMXw5LH7Bfo%3d&docid=0704e91431c934ae6a0ae721311f5ac4a&expiration=2016-11-14T16%3a25%3a02.000Z&userid=3&authurl=True&NeverAuth=True"
cTag:""c:{704E9143-1C93-4AE6-A0AE-721311F5AC4A},5""
createdBy:Object
createdDateTime:"2016-11-14T15:04:48Z"
eTag:""{704E9143-1C93-4AE6-A0AE-721311F5AC4A},6""
file:Object
id:"01SGMLUFSDSFHHBEY44ZFKBLTSCMI7LLCK"
lastModifiedBy:Object
lastModifiedDateTime:"2016-11-14T15:06:10Z"
name:"test excel.xlsx"
parentReference:Object
size:12921
webUrl:"https://one365dev1.sharepoint.com/sites/Group100/_layouts/15/WopiFrame.aspx?sourcedoc=%7B704E9143-1C93-4AE6-A0AE-721311F5AC4A%7D&file=test%20excel.xlsx&action=default"

但是当我使用时: https://graph.microsoft.com/v1.0/groups/eab89ea3-fc94-4eb9-8f47-f6d2b0a7ea88/drive/root/children?orderby=lastModifiedDateTime

它什么都不返回。如果我删除$ orderby,它会像往常一样返回它。

1 个答案:

答案 0 :(得分:1)

此链接:https://graph.microsoft.com/v1.0/groups/eab89ea3-fc94-4eb9-8f47-f6d2b0a7ea88/drive/root/children?orderby=lastModifiedDateTime

返回此输出:

{
    "error": {
        "code": "InvalidAuthenticationToken",
        "message": "Bearer access token is empty.",
        "innerError": {
            "request-id": "0c7100fe-bf7d-45e6-bb4b-a68d29d5a41f",
            "date": "2018-03-07T11:36:50"
        }
    }
}

这是预期的吗?