gpt4 book ai didi

c# - 将安全组添加到安全组失败 Request_BadRequest

转载 作者:行者123 更新时间:2023-11-30 17:29:11 28 4
gpt4 key购买 nike

我正在尝试使用 .NET Microsoft.Graph SDK 创建两个组并将一个组添加到另一个组。组创建很好,它们显示在 Microsoft Graph 资源管理器中。但是,当我尝试将该组添加到另一个组时,出现错误:

Microsoft.Graph.ServiceException
HResult=0x80131500
Message=Code: Request_BadRequest
Message: An invalid operation was included in the following modified references: 'members'.

Inner error

Source=Microsoft.Graph.Core
StackTrace:
at Microsoft.Graph.HttpProvider.<SendAsync>d__19.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.BaseRequest.<SendRequestAsync>d__36.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.BaseRequest.<SendAsync>d__31.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at [mycode].cs:line 170

我正在添加具有以下内容的组:

await _serviceClient.Groups[memberGroup.Id]
.Members
.References
.Request()
.AddAsync(new Group { Id = adminGroup.Id });

编辑这些是安全组

最佳答案

Office 365 组 ("groupTypes": ["Unified"]) 不支持“嵌套”组(将一个组添加为另一个组的成员)。只有安全组可以包含嵌套组。来自documentation :

You can add only users to Office 365 Groups.

关于c# - 将安全组添加到安全组失败 Request_BadRequest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51676607/

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