MS Graph API を使用して、OneDrive for Business からファイル/フォルダーのリストを取得しようとしています。グラフ エクスプローラーで必要なクエリを正常に実行したので、プロジェクトへの実装に移っています。
私のアプリは Windows サービスなので、このメソッドを使用してトークンを取得しています
トークンの取得に成功しましたが、この URL を「GET」すると...
//graph.microsoft.com/v1.0/users('someuseraccount')/drive/items/somedriveitem/microsoft.graph.createLink
...次のエラーで応答が返されます。
scp または roles クレームのいずれかがトークンに存在する必要があります。
サーバーからのトークン応答は次のとおりです。
{
"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-"
}