仅在包含的实体Microsoft Graph API上支持写入请求

office365 office365api office365-restapi microsoft-graph

1639 观看

1回复

59 作者的声誉

POST https://graph.microsoft.com/v1.0/Groups/bb754bb6-xxxx-xxxx-8e66-4c57c626ee29/members

Accept: application/json
Authorization: Bearer <access key>

Content:
{
  "directoryObject": {
    "id": "5cb55683-xxxx-xxxx-xxxx-5e163c939005"
  }
}

响应:

{
  error: {
    code: "BadRequest"
    message: "Write requests are only supported on contained entities"
    innerError: {
      request-id: "20167459-5495-4034-9e27-503c64340c1f"
      date: "2015-11-27T14:25:20"
    }-
  }-
}

我能够获得一个组的成员,但无法添加成员,任何建议将不胜感激。

作者: prasad nagendran 的来源 发布者: 2015 年 11 月 27 日

回应 (1)


0

1160 作者的声誉

决定

以下是向组添加成员的请求:

POST https://graph.microsoft.com/v1.0/groups/876af760-a8cd-49f0-b22c-bcb872ee97a6/members/$ref 
Authorization: Bearer <token>
Content-Type: application/json

Body:
{"@odata.id":"https://graph.microsoft.com/v1.0/users/231048d2-2761-4347-b978-07354283363b"}
作者: Yina - MSFT 发布者: 27.11.2015 06:14
32x32