当我调用具有21个用户(1个所有者+ 20个成员)的MS Graph API(创建组)时。失败并显示以下错误:
“资源不能包含超过20个链接更改”。
当我调用具有20个用户(1个所有者+ 19个成员)的MS Graph API(创建组)时,它会成功。
我想知道解释上述现象的原因。
是否与每个成员相关,都会导致“添加到群组”操作,可以视为一个批处理(即20个“添加到群组”操作)。
限制批量大小JSON批处理请求当前限制为20个单独的请求。
https://docs.microsoft.com/en-us/graph/known-issues
请澄清。
复制步骤:
调用“创建组” API 传递1个所有者和20个成员以获取此错误:“资源不能包含超过20个链接更改”。
POST https://graph.microsoft.com/v1.0/groups
{
"description": "Test Create o365 Group ACN Admin 2-1",
"displayName": "Test Create o365 Group ACN Admin 03 Sep 2019 2-1",
"groupTypes": [
"Unified"
],
"mailEnabled": true,
"visibility": "Private",
"mailNickname": "TestCreateo365GroupACNAdmin2-1",
"securityEnabled": false,
"owners@odata.bind": [
"https://graph.microsoft.com/v1.0/users/d8315eb0-7353-4958-870a-0ffb0f7f0294"
],
"members@odata.bind": [
"https://graph.microsoft.com/v1.0/users/16bdaa60-704d-434f-8fe5-acae7dc2592e",
"https://graph.microsoft.com/v1.0/users/33c7be88-32c2-40f4-99a5-69df118da872",
"https://graph.microsoft.com/v1.0/users/babc66a9-af90-43ac-bc75-969bbe114c32",
"https://graph.microsoft.com/v1.0/users/36d35ddd-08a8-4f5a-987b-b7df94c7ec4e",
"https://graph.microsoft.com/v1.0/users/398a4e5e-efe7-4af0-a478-828678d823b4",
"https://graph.microsoft.com/v1.0/users/b7842e71-49e7-4556-9549-189a1b87ec29",
"https://graph.microsoft.com/v1.0/users/7314d516-555a-4d1f-b4e8-7125d5fbd261",
"https://graph.microsoft.com/v1.0/users/ac516c9e-3a34-4a96-9436-a089d932ebf5",
"https://graph.microsoft.com/v1.0/users/7f725fff-f09b-4a67-befd-0d580a8ee492",
"https://graph.microsoft.com/v1.0/users/82db9df1-4b96-4ac7-aa51-003372beb28b",
"https://graph.microsoft.com/v1.0/users/0834b356-ae4a-4d48-a4da-05f63cb856ae",
"https://graph.microsoft.com/v1.0/users/0d7e8c36-a21a-436b-9883-5b3278aa6080",
"https://graph.microsoft.com/v1.0/users/a2f5ad0b-045a-47d5-915f-d2b38163936c",
"https://graph.microsoft.com/v1.0/users/1f8fa935-7f75-4608-aafa-04c62fc6db53",
"https://graph.microsoft.com/v1.0/users/fa13ba80-2b33-45bd-bf8a-9c488d8d1daa",
"https://graph.microsoft.com/v1.0/users/79d64a31-8600-41a9-8d5e-b183a1507e98",
"https://graph.microsoft.com/v1.0/users/8e7dd352-1c1e-4a23-8668-ff580a4524f9",
"https://graph.microsoft.com/v1.0/users/acd6da7d-dfdf-4284-aa15-31eeaea89289",
"https://graph.microsoft.com/v1.0/users/5b976ca1-7eae-408b-b462-745a5288d4f2",
"https://graph.microsoft.com/v1.0/users/ce499f5a-22fa-462f-9b9c-9a7b3f848af2",
"https://graph.microsoft.com/v1.0/users/5df4c1d7-dadc-4a53-8435-7bab4a131535",
]
}
谢谢!
答案 0 :(得分:0)
该限制应为members@odata.bind
,与Limit on batch size
(批处理请求样本格式here)无关。
当我测试批次限制时,错误将是Number of requests inside batch exceed the limit
。
如果要向该组添加20个以上的成员,则可以在创建该组后尝试使用此api Add member
。