gpt4 book ai didi

azure-active-directory - 尝试更新 'mobilePhone' 时 Microsoft Graph API 权限不足

转载 作者:行者123 更新时间:2023-12-04 08:41:08 24 4
gpt4 key购买 nike

尝试更新 ( PATCH ) 用户的 mobilePhone 时属性使用应用程序权限,来自 Graph 的响应是“没有足够的权限来完成操作”( Authorization_RequestDenied )。

两者User.ReadWrite.AllDirectory.ReadWrite.All授予权限。通过 client_credentials 请求访问 token 授予(oauth2/v2.0/token 端点)并指定 .default范围和两个权限都存在于 role 中在访问 token 中声明。

更新其他属性工作正常。错误仅在更新 mobilePhone 时出现属性并且仅具有应用程序权限(使用具有管理员用户的图形资源管理器工作)。

这种行为突然开始于2018年10月2日。在此之前,更新手机属性也适用于应用程序权限(相同的权限)。

据我所知,用户 PATCH 的 Graph 文档中没有添加新的限制/必需的权限。请求或 mobilePhone属性(property)。这里可能是什么问题?

注意:请求是使用 Microsoft.Graph.GraphServiceClient (.NET Standard) 发出的,但在使用 Postman 发出请求时,同样的行为也是如此。

编辑:

这是来自 Graph API 的响应:

{
"error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"request-id": "e956cb0b-af0a-4bb7-aae3-59d39d007a82",
"date": "2018-10-11T08:27:19"
}
}
}

最佳答案

我们的团队遇到了同样的问题,我们向 Microsoft 提出了支持请求并解决了该问题。

解决方法是添加帮助台管理员 作用到服务主体/企业申请 .

Microsoft 更改了更新 PII 的安全策略并更改了允许更新的安全角色。

以下是我们的支持请求回答中的更多内容:

The reason that this is occurring is because there was a recent change due to new PII sensitivity issues.

So now you will need to add the Helpdesk Administrator role to the Service Principal/Enterprise application now.

You can do this by following the article here : https://blogs.msdn.microsoft.com/aaddevsup/2018/08/29/how-to-add-an-azure-ad-role-to-a-enterprise-application-service-principal/

This is to modify values such as : mobile/othermails/telephonenumber attributes.

关于azure-active-directory - 尝试更新 'mobilePhone' 时 Microsoft Graph API 权限不足,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52626067/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com