【发布时间】:2021-09-10 18:13:35
【问题描述】:
将成员添加到具有权限类型的 Microsoft 365 组时:委托 - 我正在使用以下错误:
Microsoft.Graph.ServiceException
HResult=0x80131500
Message=Code: Authorization_RequestDenied
Message: Insufficient privileges to complete the operation.
根据 Microsoft 的文档 - 所有必需的权限都已添加到 AD 应用程序中:GroupMember.ReadWrite.All, Group.ReadWrite.All, Directory.ReadWrite.All, Directory.AccessAsUser.All
https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=csharp
我正在使用 Microsoft 提供的相同代码请求:
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var directoryObject = new DirectoryObject
{
Id = "{id}"
};
await graphClient.Groups["{group-id}"].Members.References
.Request()
.AddAsync(directoryObject);
还缺少哪些权限?
【问题讨论】:
-
@Tarkan Sevilmis:如果您也可以在这里提供帮助。