[英]MS-Graph request: insufficient privileges
I'm having an issue with my .net core daemon-application recently.我最近遇到了我的 .net 核心守护程序应用程序的问题。 This worked fine at least a couple of days ago.
这至少在几天前工作得很好。
My request goes to https://graph.microsoft.com/v1.0/users :我的请求转到https://graph.microsoft.com/v1.0/users :
var user = await client.Users[userPrincipalName]
.Request()
.Select("displayName,givenName,mail,mobilePhone,surname,userPrincipalName,id,onPremisesSecurityIdentifier,onPremisesDomainName,onPremisesSamAccountName")
.GetAsync();
and returns the following error:并返回以下错误:
{
"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"
}
}
}
I tried resetting the API permissions in Azure, ensuring User.Read.All permission, revoking/removing/granting admin consent and resetting the token secret, all to no avail.我尝试在 Azure 中重置 API 权限,确保 User.Read.All 权限,撤销/删除/授予管理员同意并重置令牌密码,一切都无济于事。 When using Graph Explorer with my personal account (and thus using delegated permissions instead of application permissions), everything works fine.
将 Graph Explorer 与我的个人帐户一起使用时(因此使用委派权限而不是应用程序权限),一切正常。
Is this a Graph-Api-Problem?这是一个 Graph-Api-Problem 吗? Am I doing something wrong?
难道我做错了什么? It seems others are having this issue as well: Microsoft Graph API throwing exception
似乎其他人也有这个问题: Microsoft Graph API throwing exception
Following this recommendation:遵循此建议:
***Hi @Rolson, **Remove the Group.Selected permission for the time being and try again**. – Hari Krishna-- MSFT Identity 1 hour ago***
also solved my issue.也解决了我的问题。 Microsoft Graph API throwing exception
Microsoft Graph API 抛出异常
@ Hari Krishna- - What is the background of your proposal? @ Hari Krishna- - 你求婚的背景是什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.