AI content label is not appearing when using Microsoft botbuilder Typescript library

mj2148 0 Reputation points
2026-01-21T17:58:18.62+00:00

I have created a bot messaging endpoint for my custom Microsoft Teams app using Microsoft's botbuilder library (version 4.23.3). I have been trying to add the AI-generated content label to the bot's responses using these instructions: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bot-messages-ai-generated-content?tabs=desktop%2Cjs%2Cbotmessage#add-ai-label

However, even when I copy and paste this exact code, the message does not appear with a label.

await context.sendActivity({
  type: ActivityTypes.Message,
  text: `Hey! I'm a friendly AI bot. This message is generated by AI.`,
  entities: [
    {
     type: "https://schema.org/Message",
     "@type": "Message",
     "@context": "https://schema.org",
     additionalType: ["AIGeneratedContent"], // Enables AI label
    }
  ]
});

I am using Microsoft Teams desktop, using the latest version as of this post.

Thank you for your help.

Microsoft Teams | Development
Microsoft Teams | Development
Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
{count} votes

3 answers

Sort by: Most helpful
  1. Q&A Assist
    2026-01-21T17:59:31.1566667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To ensure that the AI-generated content label appears in your bot's messages using the Microsoft Bot Framework SDK, please verify the following:

    1. Correct Implementation: Ensure that the additionalType property is correctly set in the entities array of the message entity object, as shown in your provided code snippet. The value should be AIGeneratedContent.
    2. Message Format: The message must be structured correctly as per the requirements of the Microsoft Teams platform. Ensure that there are no additional root message entities that could cause a conflict.
    3. Bot Framework Version: You are using version 4.23.3 of the botbuilder library, which should support this feature. However, ensure that you are using the latest version if possible, as updates may include important bug fixes or enhancements.
    4. Testing Environment: Make sure you are testing in a compatible environment (Microsoft Teams desktop) and that your Teams client is up to date.
    5. Error Handling: Check for any errors in the console or logs that might indicate issues with the message being sent. The error code 400 may indicate problems with the message entity structure.

    If you have verified all of the above and the label still does not appear, consider reaching out to Microsoft support or checking the community forums for additional assistance.


    References:


  2. Teddie-D 11,985 Reputation points Microsoft External Staff Moderator
    2026-01-22T02:50:02.33+00:00

    Hi @mj2148 

    Thank you for posting your question in the Microsoft Q&A forum. 

    Based on your description, it appears that the AI-generated content label is not appearing in Microsoft Teams even when using the sample code from the documentation.

    Several other users have reported the same behavior: 

    In that case, a user reported success by creating a custom class that inherits from Entity and confirmed that the AI label rendered successfully in their scenario. You may want to try that approach as a workaround

    You can also refer to How to configure custom AI labels in bot turn context activity entity - Microsoft Q&A. In this case, the AI-generated label was displayed successfully, although customization of the label text itself was not supported.

    I hope this helps. 


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Sayali-MSFT 4,781 Reputation points Microsoft External Staff Moderator
    2026-01-22T11:16:29.7133333+00:00

    Hello @mj2148,
    Your implementation is correct and follows Bot Framework v4 and Microsoft’s documentation precisely, but the missing AI-generated content label is due to a current Microsoft Teams platform limitation, not a coding issue.

    Although Teams accepts and stores the AIGeneratedContent entity, the Teams client does not visually render AI labels for third-party or custom bots yet. Today, the label is only shown for Microsoft first-party experiences (such as Copilot) and select internal scenarios. This behavior is by design.

    The documentation explains how to attach AI metadata, but it does not guarantee client-side rendering for all bots. Internally, Teams already stores and processes this metadata for compliance and safety, even though the UI display is gated.

    You can verify that the entity is being sent by inspecting bot activities (Bot Framework Emulator, logs, or compliance exports). SDK upgrades, manifest changes, Adaptive Cards, Graph sends, or other flags will not make the label appear.

    Current workaround**:** explicitly disclose AI usage in the message text itself.

    also you can refer the below sample:-
    1.https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-ai-meeting-helper
    2.https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-ai-enterprise-search/nodejs

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.