【问题标题】:Unable to get response from Microsoft Graph API endpoint无法从 Microsoft Graph API 端点获得响应
【发布时间】:2019-08-10 00:22:53
【问题描述】:

我在 microsoft azure 中设置了一个新应用程序,并让管理员同意此应用程序的应用程序权限 (files.ReadWriteAll)。我可以通过邮递员获得access_token。我正在尝试使用此端点获取驱动器信息

https://graph.microsoft.com/v1.0/drives/{drive-id}

但我得到一个错误响应:-

{ "error": { "code": "AccessDenied", "message": "Either scp or roles claim need to be present in the token.", "innerError": { "request-id": "905c7701-8b89-4711-9204-b00c4a09a921", "date": "2019-03-28T15:56:29" } } }

我使用此链接获取有关我的访问令牌的信息。 http://jwt.calebb.net/

Files.Readwrite 权限似乎没有在信息中的任何地方列出(不知道为什么)。天蓝色的网站显示已获得同意。

为我的应用设置的 Azure 权限:

【问题讨论】:

    标签: azure oauth microsoft-graph-api credentials


    【解决方案1】:

    检查以下步骤。

    1. this document 之后注册您的应用,并授予权限。

    2. 像这样获取访问令牌。

    1. 检查令牌

    1. 调用图API

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-25
      • 2022-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-08
      • 2017-11-28
      相关资源
      最近更新 更多