尝试使用Graph Explorer中的基本示例。我正在反对beta API,但我认为这应该是根据文档工作。
GET https://graph.microsoft.com/beta/sites/root
我回来了
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#sites/$entity",
"createdDateTime": "2016-10-11T21:54:40.16Z",
"description": "",
"id": "contoso.sharepoint.com,11111111-1111-1111-1111-11111111,11111111-1111-1111-1111-11111111",
"lastModifiedDateTime": "2017-06-14T20:03:19Z",
"name": "",
"webUrl": "https://contoso.sharepoint.com",
"root": {},
"siteCollection": {
"hostname": "contoso.sharepoint.com"
},
"displayName": "The Site"
}
很棒,我收到了我的网站,但我没有看到https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/site
预期的列表尝试https://graph.microsoft.com/beta/sites/root/lists
或https://graph.microsoft.com/v1.0/sites/root?expand=lists
后,我
{
"error": {
"code": "unauthenticated",
"message": "Access denied. You do not have permission to perform this action or access this resource.",
"innerError": {
"request-id": "ded1ecbe-9664-4a29-9f8b-3278aeebc6d0",
"date": "2017-06-14T20:33:35"
}
}
}