尝试使用Microsoft Graph api搜索Sharepoint文件

前端之家收集整理的这篇文章主要介绍了尝试使用Microsoft Graph api搜索Sharepoint文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我们正在使用Microsoft Graph API(最近重新命名为Office365统一API的新API).我们有一个OAUTH登录,graph.microsoft.com资源用于生成令牌.它可以很好地获得其他子资源,比如/ me.但是当在Microsoft Graph的文档中使用URL来讨论搜索驱动器(和SharePoint?)时,我们找不到一种方法来使任何示例URL工作.当驱动器可供用户使用或SharePoint时,它不起作用.

所以第一个问题,为什么会产生错误

获取https://graph.microsoft.com/v1.0/drive/root/Microsoft.Graph.search?q=img

Rreturns一个不好的要求:

Error: 400 - Bad Request
See Response Headers for details.
{
"error": {
"code": "BadRequest","message": "Unsupported segment type.","innerError": {
  "request-id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","date": "2015-11-23T16:58:26"
}
}
}

这是响应标题

Transfer-Encoding: chunked
request-id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
client-request-id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US","Slice":"SliceB","ScaleUnit":"002","Host":"AGSFE_IN_4","ADSiteName":"WST"}}
OutBoundDuration: 0
Duration: 2.2283
Cache-Control: private
Date: Mon,23 Nov 2015 16:58:25 GMT
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET

问题的第二部分,这也是搜索Sharepoint的提示吗?在图API中没有单独的API.

猜你在找的Windows相关文章