首页 文章

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

提问于
浏览
1

我通过Microsoft Graph API将 security 组(通过API创建)更新为 mail enabled 安全组时出现以下错误 .

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

根据https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/group_update#request-body文档,我相信可以拥有一个具有邮件启用功能的安全组 .

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

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

请建议是否需要以不同的格式形成请求?

1 回答

  • 1

    我担心Microsoft Graph不完全支持启用邮件的安全组 . 来自documentation

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

    可以通过Exchange管理已启用邮件的安全组 . 您可以在Manage mail-enabled security groups in Exchange 2016中找到更多相关详细信息 .

相关问题