【问题标题】:How to reset API permissions Microsoft Graph如何重置 API 权限 Microsoft Graph
【发布时间】:2019-07-17 15:28:17
【问题描述】:

我正在使用 Microsoft Graph 开发一些东西。 起初,只是给予一些许可。 但我发现这还不够。我添加了更多权限。 但它似乎不起作用。因为我登录后,授权网不出来

我正在按照here 的步骤使用 Microsoft Graph。我正在使用 ADv1

我添加了“User.ReadBasic.All”。

我正在尝试通过“/users?$select=displayName,userPrincipalName”获取信息。 错误如下

BotFrameworkAdapter.processActivity(): 500 ERROR - [object Object]
botFrameworkAdapter.ts:607
(node:1752) UnhandledPromiseRejectionWarning: Error: [object Object]
    at BotFrameworkAdapter.processActivity (c:\Users\XXXXXX\src\botFrameworkAdapter.ts:608:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
warning.js:18
(node:1752) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
warning.js:18
(node:1752) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

【问题讨论】:

标签: azure-active-directory microsoft-graph-api


【解决方案1】:

更新权限后,用户和/或管理员必须再次同意。

点击“授予 XXX 的管理员许可”以授予管理员许可

通过 url 请求强制用户同意

https://login.microsoftonline.com/{tenant}/oauth2/authorize?
client_id={your_client_id}
&response_type=code
&response_mode=query
&resource=https://graph.microsoft.com
&state=12345
&prompt=consent

详情请参阅this document

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-11-04
    • 1970-01-01
    • 2017-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-24
    相关资源
    最近更新 更多