Microsoft graph api 无法通过Microsoft Graph API更新到启用邮件的安全组

Microsoft graph api 无法通过Microsoft Graph API更新到启用邮件的安全组,microsoft-graph-api,Microsoft Graph Api,通过Microsoft Graph API将安全组(通过API创建)更新为邮件启用的安全组时出现以下错误 { "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 t

通过Microsoft Graph API将安全组(通过API创建)更新为邮件启用的安全组时出现以下错误

{
  "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": "34bc9a4d-9e52-4c2e-b847-99f8dbf43518",
      "date": "2018-04-09T13:05:10"
    },
    "details": [
      {
        "target": "mailEnabled",
        "code": "InvalidValue"
      }
    ]
  }
}
根据文档,我相信有一个支持邮件功能的安全组是可能的

这是原始请求(通过Fiddler捕获)

补丁https://graph.microsoft.com/v1.0/groups HTTP/1.1
接受:application/json
授权:持票人
内容类型:application/json;字符集=utf-8
主持人:graph.microsoft.com
内容长度:96
预期:100人继续
连接:保持活力
{“mailEnabled”:true,“Mail昵称”:“”}

请建议是否需要以其他格式生成请求?

Microsoft Graph不完全支持启用邮件的安全组。从:

无法通过API创建启用邮件的安全组,但其他组操作可以工作。启用邮件的安全组是只读的

启用邮件的安全组可以通过Exchange进行管理。您可以在中找到有关此的更多详细信息

PATCH https://graph.microsoft.com/v1.0/groups<<groupId>> HTTP/1.1
Accept: application/json
Authorization: Bearer <<Authorization Token>>
Content-Type: application/json; charset=utf-8
Host: graph.microsoft.com
Content-Length: 96
Expect: 100-continue
Connection: Keep-Alive

{"mailEnabled":true,"mailNickname":"<<mailNickName>>"}