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

Office365 写入请求仅在包含的实体、Microsoft Graph API上受支持,office365,office365api,office365-restapi,microsoft-graph-api,Office365,Office365api,Office365 Restapi,Microsoft Graph Api,我能够获得组成员,但无法向其中添加成员,如有任何建议,将不胜感激。以下是向组中添加成员的请求: { error: { code: "BadRequest" message: "Write requests are only supported on contained entities" innerError: { request-id: "20167459-5495-4034-9e27-503c64340c1f" date: "2015-11

我能够获得组成员,但无法向其中添加成员,如有任何建议,将不胜感激。

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

{
  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"
    }-
  }-
}
POSThttps://graph.microsoft.com/v1.0/groups/876af760-a8cd-49f0-b22c-bcb872ee97a6/members/$ref
授权:持票人
内容类型:application/json
正文:
{“@odata.id”:https://graph.microsoft.com/v1.0/users/231048d2-2761-4347-b978-07354283363b"}

对于将来使用PowerShell调用请求的查看器,不要忘记在URI中添加“`”字符以转义“$”符号。
{
  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"
    }-
  }-
}
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"}