【发布时间】:2020-07-15 10:51:13
【问题描述】:
我目前正在实施一个可以访问某些邮件字段的 Outlook 加载项。因此,我设置了一个启动项目并在 Microsoft Azure Active Directory 设置中设置了委派的 Mail.Read 权限,并将其添加到我的范围配置中。 但是,当我发送请求时
graph.microsoft.com/v1.0/me/messages/
我得到这个作为回应:
Error: Bad Request
at IncomingMessage.<anonymous> (C:\Users\zz\public\javascripts\odata-helper.js:53:29)
at IncomingMessage.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 400,
bodyCode: 'AuthenticationError',
bodyMessage: 'Error authenticating with resource'
}
我不明白为什么会出现此错误,因为用户身份验证有效并且我对其他 Graph Endpoints 没有任何问题(例如,从 /me/drive/root/children 检索我的 OneDrive 文件列表)
我将其用作代码库: https://docs.microsoft.com/en-us/office/dev/add-ins/develop/create-sso-office-add-ins-nodejs
【问题讨论】:
-
请提供请求或关联 ID 和时间戳。如果在异常中不可用,那么您可以让他们检查 fiddler 中的响应。
-
嗨,您有机会查看我的答案吗?有用吗?
标签: rest azure-active-directory microsoft-graph-api outlook-addin microsoft-graph-mail