当我试图获取站点集合和站点ID时,我得到了下面的错误。可能是什么原因?任何帮助都会很感激的。
var getMessage = new HttpRequestMessage(HttpMethod.Get, "https://www.onenote.com/api/beta/myorganization/siteCollections/FromUrl(url='https://123.sharepoint.com/teams/techs'");
{
StatusCode: 400,
ReasonPhrase: 'Bad Request',
Version: 1.1,
Content: System.Net.Http.StreamContent,
Headers: {
OData - Version: 4.0 Cache - Control: private Server: Microsoft - IIS / 8.5 X - AspNet - Version: 4.0.30319 X - Powered - By: ASP.NET X - Powered - By: ASP.NET Date: Sun, 17 Jan 2016 19: 59: 05 GMT Content - Length: 168 Content - Type: application / json;
charset = utf - 8;
odata.metadata = minimal;
odata.streaming = true;
IEEE754Compatible = false
}
}发布于 2016-01-26 17:09:57
如果这是逐字代码片段,则看起来您缺少了url参数的结束括号。
var getMessage = new HttpRequestMessage(HttpMethod.Get, "https://www.onenote.com/api/beta/myorganization/siteCollections/FromUrl(url='https://123.sharepoint.com/teams/techs')");发布于 2016-01-25 22:44:08
看起来您可能丢失了与身份验证相关的标头。
http://blogs.msdn.com/b/onenotedev/archive/2015/06/11/and-sharepoint-makes-three.aspx
https://stackoverflow.com/questions/35003074
复制相似问题