我尝试使用Microsoft Graph API创建动态通讯组,但总是会导致错误:
POST https://graph.microsoft.com/v1.0/groups
{
"displayName": "Dynamic Group",
"groupTypes": ["DynamicMembership"],
"mailNickname": "dynamic1",
"mailEnabled": true,
"securityEnabled": false
}
结果:
{
"error": {
"code": "Request_BadRequest",
"message": "The service does not currently support writes of mail-enabled groups. Please ensure that the mail-enablement property is unset and the security-enablement property is set.",
"innerError": {
"request-id": "748bcafc-f655-463c-b8d3-4ffc55307232",
"date": "2016-09-13T13:23:36"
}
}
}
有趣的是,当我添加"统一"对于groupTypes,它显示了不同的错误:
{
"displayName": "Dynamic Group",
"groupTypes": ["DynamicMembership","Unified"],
"mailNickname": "dynamic1",
"mailEnabled": true,
"securityEnabled": false
}
结果:
{
"error": {
"code": "Request_BadRequest",
"message": "A value is required for property 'MembershipRule'.",
"innerError": {
"request-id": "58c5d344-c69b-4c9b-8997-28df35c78cb8",
"date": "2016-09-13T13:24:43"
}
}
}
但是,我无法找到有关会员规则的任何文件。字段。
如果我只使用"统一"组类型,它成功了。但我需要的是" DynamicMembership"
{
"displayName": "Test 5",
"groupTypes": ["Unified"],
"mailNickname": "test5",
"mailEnabled": true,
"securityEnabled": false
}
是否可以使用Microsoft Graph API创建动态通讯组?这是文档: http://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/group_post_groups
答案 0 :(得分:1)
目前,Microsoft Graph API不能用于创建具有动态成员资格的组。我们正在努力启用该功能,它应该很快就可以使用。到那时,请使用Azure门户创建此类组。