如何在图形API中为“Chat”资源类型注册模式扩展

huangapple go评论57阅读模式
英文:

How to register schema extension for "Chat" resource type in graph api

问题

我正在尝试使用 schemaExtension 在 MS Graph 中为 Chat 资源类型添加新属性,但是当我尝试为 chat 资源类型注册 schema 扩展时,我收到了以下错误:

HTTP Post - https://graph.microsoft.com/v1.0/schemaExtensions

Body - 

{
  "id": "<extensionId>",
  "description": "<extensionDescription>",
  "targetTypes": [
    "Chat"
  ],
  "properties": [
    {
      "name": "<customPropertyName>",
      "type": "String"
    }
  ]
}

Error - 

{
    "error": {
        "code": "BadRequest",
        "message": "Argument targetType chat is invalid.",
        "innerError": {
            "date": "2023-06-21T12:39:41",
            "request-id": "<request-id>",
            "client-request-id": "<client-request-id>"
        }
    }
}

如需进一步帮助,请提出具体问题。

英文:

I am trying to add a new property to the Chat resource type in MS graph using schemaExtention, however when I try to register schema extension for a chat resource type I get an error

HTTP Post - https://graph.microsoft.com/v1.0/schemaExtensions

Body -

{
  &quot;id&quot;: &quot;&lt;extensionId&gt;&quot;,
  &quot;description&quot;: &quot;&lt;extensionDescription&gt;&quot;,
  &quot;targetTypes&quot;: [
    &quot;Chat&quot;
  ],
  &quot;properties&quot;: [
    {
      &quot;name&quot;: &quot;&lt;customPropertyName&gt;&quot;,
      &quot;type&quot;: &quot;String&quot;
    }
  ]
}

Error -

{
    &quot;error&quot;: {
        &quot;code&quot;: &quot;BadRequest&quot;,
        &quot;message&quot;: &quot;Argument targetType chat is invalid.&quot;,
        &quot;innerError&quot;: {
            &quot;date&quot;: &quot;2023-06-21T12:39:41&quot;,
            &quot;request-id&quot;: &quot;&lt;request-id&gt;&quot;,
            &quot;client-request-id&quot;: &quot;&lt;client-request-id&gt;&quot;
        }
    }
}

答案1

得分: 1

Schema extensions are not supported by chat resource type.

Supported resource types are user, group, administrativeUnit, application, contact, device, event, message, organization, and post.

Documentation:

schemaExtension

英文:

Schema extensions are not supported by chat resource type.

Supported resource types are user, group, administrativeUnit, application, contact, device, event, message, organization and post.

Documentation:

schemaExtension

huangapple
  • 本文由 发表于 2023年6月21日 22:48:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76524588.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定