首页 文章

无法通过Graph API创建动态通讯组

提问于
浏览
0

我正在尝试使用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添加“Unified”时,它会显示不同的错误:

{
  "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"
    }
  }
}

但是我找不到任何关于'MembershipRule'字段的文档 .

如果我只使用“统一”组类型,则会成功 . 但我需要的是“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

1 回答

  • 1

    目前,Microsoft Graph API不能用于创建具有动态成员资格的组 . 我们正在努力启用该功能,它应该很快就可以使用 . 到那时,请使用Azure门户创建此类组 .

相关问题