[BUG] Teams / Graph API Regression: "codeBlockEditor" vs <codeblock> in HTML Content Results

オープン
#1,995 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
20/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
領域
api, backend

調査の方向性

Start by reproducing the issue with a Teams chat message containing inline code followed by a triple-backtick block, then query it with GET /v1.0/chats/{id}/messages/{msg}. The payload names no files, tests, or SDK entry point; done would require the returned HTML to preserve each code block's own content instead of reusing an earlier code element.

索引モデルが issue の本文から書いたものです。

説明

status:waiting-for-triage type:bug
Describe the bug

Per: https://learn.microsoft.com/en-us/answers/questions/5728345/(bug)-teams-graph-api-regression-codeblockeditor-v

[I'm not sure if the "Javascript SDK" is the right place for this, because it's a server-side bug, but here goes... If there's a better repository, I'd be happy to repost it there, thanks!]

Within the past week or so (January 2026) whenever I GET /v1.0/chats/{id}/messages/{msg}, it seems that "triple-backtick" code blocks have gone from being sent as <p itemtype="http://schema.skype.com/CodeBlockEditor"> elements to dedicated <codeblock> tags, with embedded <code> inside...

That wouldn't be a problem, EXCEPT I've noticed that when there's another <code> tag earlier in the message content, it replaces the contents of any subsequent <codeblock><CODE>...</CODE></codeblock> blocks.

To wit:

    The `message` is:
    ```
        Hello, world!
    ```

Produces the following snippet of JSON:

    "body": {
      "content": "<p>The <code>message</code> is:</p>\n<codeblock class=\"PlainText\"><code>message</code></codeblock>",
      "contentType": "html"
    }

Note that the second message does NOT say "Hello, world!"

This also happens for other "triple-backtick" code blocks:

    ```
    Line One
    ```

    Line `Two`

    ```
    Line Three
    ```

Becomes "One, Two, One" :-(

Expected behavior

In the first example, I would expect to see <codeblock><code> Hello, world!</code></codeblock>

How to reproduce

Send a Teams message (chat or channel) with the markup:

    This is `inline code`

    ```
    This is a block
    ```

Then query that message via the Graph API; you'll see that it returns the wrong results.

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

No response

Configuration

No response

Other information

Like I say, I tried looking for a more API-related repository, but github.com/microsoftgraph lists, like, 230 different repos, and I only made it through ~3 pages of results before I gave up... «sigh»

主要言語
TypeScript
スター
833
フォーク
240
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoftgraph/msgraph-sdk-javascript のほかの issue

microsoftgraph/msgraph-sdk-javascript の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。