本文介绍了Microsoft Graph API抛出异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
两天以来,我收到一个异常调用:
var usersInGroup = await graphClient.Groups[groupid].Members.Request().GetAsync();
{
"error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"request-id": "4069215a-945f-4cc0-abbf-132d703f55ae",
"date": "2020-04-28T08:18:49"
}
}
}
此呼叫在获得适当的权限之前一直有效.
此API/服务是否存在任何已知问题?有什么简单的方法可以在Azure门户中调试/监视呼叫?
致以最诚挚的问候雷纳(Rainer)解决方案
似乎有应用程序许可权Group.Selected
,它会影响此API端点/memberOf
的调用.删除此权限将解决此问题.
since two days I get an exception calling :
var usersInGroup = await graphClient.Groups[groupid].Members.Request().GetAsync();
{
"error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"request-id": "4069215a-945f-4cc0-abbf-132d703f55ae",
"date": "2020-04-28T08:18:49"
}
}
}
This call always worked before and proper permissions are given and consented.
Is there any known issue with this API / service ?Any easy way to debug / monitor calls in Azure portal ?
best regardsRainer
解决方案
There seems like an Application permission Group.Selected
that affects the calling of this API endpoint /memberOf
. Removing this permission will fix the issue.
这篇关于Microsoft Graph API抛出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!