MS-Graph请求:权限不足

问题描述 投票:0回答:1

最近我的.net core守护程序遇到了一个问题。至少在几天前还能正常工作。

我的请求是 https:/graph.microsoft.comv1.0users。:

var user = await client.Users[userPrincipalName]
                .Request()
                .Select("displayName,givenName,mail,mobilePhone,surname,userPrincipalName,id,onPremisesSecurityIdentifier,onPremisesDomainName,onPremisesSamAccountName")
                .GetAsync();

并返回以下错误。

{
  "error": {
    "code": "Authorization_RequestDenied",
    "message": "Insufficient privileges to complete the operation.",
    "innerError": {
      "request-id": "482eac1f-5a38-429a-a0cb-bf5a47ae4b27",
      "date": "2020-04-28T11:31:33"
    }
  }
}

我尝试在Azure中重置API权限,确保User.Read.All权限,撤销removinggranting管理员同意和重置令牌秘密,但都无济于事。当用我的个人账户使用 Graph Explorer 时(从而使用委托权限而不是应用程序权限),一切都能正常工作。

这是Graph-API的问题吗?我是否做错了什么?似乎其他人也有这个问题。Microsoft Graph API抛出异常

c# .net-core microsoft-graph
1个回答
0
投票

按照这个建议:

***Hi @Rolson, **Remove the Group.Selected permission for the time being and try again**. – Hari Krishna-- MSFT Identity 1 hour ago***

也解决了我的问题。微软Graph API抛出异常

@ Hari Krishna -- 你的提案是什么背景?

© www.soinside.com 2019 - 2024. All rights reserved.