我试图使用MS Graph API从OneDrive for Business获取文件/文件夹的列表。我已经成功地执行了我在Graph Explorer中需要的查询,现在正在我的项目中进行实施。图API:scp或role声明需要存在于令牌中
我的应用程序是一个Windows服务,所以我获得使用this method
我已经成功地获取一个令牌的令牌,但是当我“GET”这个网址... //graph.microsoft.com/v1.0/users('someuseraccount')/drive/items/somedriveitem/microsoft.graph.createLink
。 ..我得到响应与错误:
我从服务器令牌响应如下:
{
"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-"
}
您能否提供您的通话的请求ID和时间戳? –
@baparks您能否显示为此添加的权限的屏幕截图? AFAIK,文件等只能使用DELEGATED权限而不是应用程序权限进行访问。 –