我正在尝试使用MS Graph API从OneDrive for Business中获取文件/文件夹列表。我已经成功地在Graph Explorer中执行了所需的查询,现在正在实施到我的项目中。
我的应用程序是一个Windows服务,因此我正在使用this method来获取令牌。
我已经成功地检索到了令牌,但是当我“GET”这个URL时... //graph.microsoft.com/v1.0/users('someuseraccount')/drive/items/somedriveitem/microsoft.graph.createLink
...我收到一个带有错误的响应: Either scp or roles claim need to be present in the token.
服务器返回的我的令牌响应如下:
我的应用程序是一个Windows服务,因此我正在使用this method来获取令牌。
我已经成功地检索到了令牌,但是当我“GET”这个URL时... //graph.microsoft.com/v1.0/users('someuseraccount')/drive/items/somedriveitem/microsoft.graph.createLink
...我收到一个带有错误的响应: Either scp or roles claim need to be present in the token.
服务器返回的我的令牌响应如下:
{
"token_type": "Bearer",
"expires_in": "3600",
"scope": "Directory.AccessAsUser.All Files.Read Files.Read.Selected Files.ReadWrite Files.ReadWrite.AppFolder Files.ReadWrite.Selected profile Sites.Read.All User.Read",
"expires_on": "1457343736",
"not_before": "1457339836",
"resource": "https://graph.microsoft.com",
"access_token": "-the token-"
}