[BUG] Teams / Graph API Regression: "codeBlockEditor" vs <codeblock> in HTML Content Results
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
Research direction
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.
Written by the indexing model from the issue text.
Description
Describe the bug
[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»
- Dominant language
- TypeScript
- Stars
- 833
- Forks
- 240
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-javascript
-
status:waiting-for-triage
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
Is anyone here? Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoftgraph/msgraph-sdk-javascript#2005 · 1 reaction ·
-
Is it really correct that the Javascript version of the graph SDK doesn't offer typed requests? Openstatus:waiting-for-triage
Difficulty 5/5 Over a week Newbie friendliness 42/100
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · 2 comments · 1 reaction ·
-
status:waiting-for-triage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in microsoftgraph/msgraph-sdk-javascript
Similar issues
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 88/100
digidem/comapeo-cloud-app#403 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100