【问题标题】:Unable to update to mail enabled security group by Microsoft Graph API无法通过 Microsoft Graph API 更新到启用邮件的安全组
【发布时间】:2020-12-22 15:39:26
【问题描述】:

我在通过 Microsoft Graph API 将 security 组(通过​​ API 创建)更新为 ma​​il 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>>"}

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

【问题讨论】:

    标签: microsoft-graph-api


    【解决方案1】:

    恐怕 Microsoft Graph 不完全支持启用邮件的安全组。来自documentation

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-12
      • 2016-09-20
      • 1970-01-01
      • 1970-01-01
      • 2021-01-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多