Skip to content

[Doc Feature][Enable delete bot messages][4285928] #12464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 81 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
404b567
Create enable-delete-bot-messages.md
v-shalinir Mar 11, 2025
9d0ccb8
Merge branch 'main' into enable-delete-bot-messages
v-shalinir Mar 12, 2025
0657b5d
Update enable-delete-bot-messages.md
v-shalinir Mar 12, 2025
81b454c
Merge branch 'main' into enable-delete-bot-messages
v-shalinir Mar 12, 2025
672464f
Update enable-delete-bot-messages.md
v-shalinir Mar 12, 2025
32873c7
Update enable-delete-bot-messages.md
v-shalinir Mar 12, 2025
0b5c24a
Update enable-delete-bot-messages.md
v-shalinir Mar 12, 2025
f148093
Update enable-delete-bot-messages.md
v-shalinir Mar 12, 2025
b721b7c
Update enable-delete-bot-messages.md
v-shalinir Mar 12, 2025
2034b55
Update enable-delete-bot-messages.md
v-shalinir Mar 12, 2025
57112b3
Merge branch 'main' into enable-delete-bot-messages
v-shalinir Mar 17, 2025
7c2255d
Update enable-delete-bot-messages.md
v-shalinir Mar 17, 2025
5230728
Update enable-delete-bot-messages.md
v-shalinir Mar 17, 2025
34c6b2a
Update enable-delete-bot-messages.md
v-shalinir Mar 17, 2025
146c54f
Merge branch 'main' into enable-delete-bot-messages
v-shalinir Mar 19, 2025
d071e78
Update enable-delete-bot-messages.md
v-shalinir Mar 19, 2025
fb3e8f1
Merge branch 'main' into enable-delete-bot-messages
v-shalinir Mar 21, 2025
7ac3743
Update enable-delete-bot-messages.md
v-shalinir Mar 21, 2025
033e19c
Update enable-delete-bot-messages.md
v-shalinir Mar 21, 2025
93d88aa
Updates
v-shalinir Mar 21, 2025
f61d531
Image - mobile
v-shalinir Mar 21, 2025
63b00be
Merge branch 'main' into enable-delete-bot-messages
v-shalinir Mar 24, 2025
dce76a5
Updates
v-shalinir Mar 24, 2025
7a0acae
Update TOC.yml
v-shalinir Mar 24, 2025
74e8ab4
Update enable-delete-bot-messages.md
v-shalinir Mar 24, 2025
85b68b3
Images updated
v-shalinir Mar 24, 2025
1911968
Update enable-delete-bot-messages.md
v-shalinir Mar 24, 2025
d540202
Update enable-delete-bot-messages.md
v-shalinir Mar 24, 2025
39d0dbb
Update enable-delete-bot-messages.md
v-shalinir Mar 24, 2025
53edf2a
Update enable-delete-bot-messages.md
v-shalinir Mar 24, 2025
9dcb5a5
Update enable-delete-bot-messages.md
v-shalinir Mar 24, 2025
14407d6
Update enable-delete-bot-messages.md
v-shalinir Mar 24, 2025
86cdf6f
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
f774c34
Updates
v-shalinir Mar 25, 2025
2a42b98
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
0c37ecd
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
2689ae5
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
b7f5875
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
aba7cde
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
fbf079d
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
89e232b
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
cc7cb7c
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
3429ff5
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
998d93c
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
b9eb48f
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
bb42c5d
Update message-delete-undo.png
v-shalinir Mar 25, 2025
e9c8787
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
5fd7be0
Update enable-delete-bot-messages.md
v-shalinir Mar 25, 2025
bf36795
Update enable-delete-bot-messages.md
v-shalinir Mar 26, 2025
16bd2ed
Update enable-delete-bot-messages.md
v-shalinir Mar 26, 2025
cc14b48
Update enable-delete-bot-messages.md
v-shalinir Mar 26, 2025
3da3c9d
Update enable-delete-bot-messages.md
v-shalinir Mar 26, 2025
efcb8ab
Update enable-delete-bot-messages.md
v-shalinir Mar 26, 2025
313f7cf
Merge branch 'main' into enable-delete-bot-messages
v-shalinir Mar 27, 2025
8aa9425
Updates
v-shalinir Mar 27, 2025
435bc9d
Update admin-center-config.png
v-shalinir Mar 27, 2025
78c56e3
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
f74a697
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
b16b8c2
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
db23dba
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
32dbcb3
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
efa1fa3
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
3c6de3a
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
3d3fa47
Update enable-delete-bot-messages.md
v-shalinir Mar 27, 2025
bfafda9
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
0be1792
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
62af7ff
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
77572c8
Added gif file
v-shalinir Mar 28, 2025
06487d1
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
26ca76d
Added gif for gc
v-shalinir Mar 28, 2025
f40e476
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
4d42442
updated gif
v-shalinir Mar 28, 2025
8334ee1
Updated gif
v-shalinir Mar 28, 2025
a71c377
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
0fdef12
Remove unnecessary files
v-shalinir Mar 28, 2025
6ac3962
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
373bfca
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
7769228
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
667aadb
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
13f64fc
Update enable-delete-bot-messages.md
v-shalinir Mar 28, 2025
70e85c4
Merge branch 'main' into enable-delete-bot-messages
v-shalinir May 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions msteams-platform/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@
- name: Enhance AI-generated bot messages
href: bots/how-to/bot-messages-ai-generated-content.md
displayName: AI label, citations, feedback buttons, sensitivity label, Powered by AI UX Kit
- name: Enable users to delete bot messages
href: bots/how-to/enable-delete-bot-messages.md
displayName: delete bot messages, delete message button, delete message notification, allow user to delete bot message
- name: Understand bot concepts
href: bots/bot-concepts.md
displayName: Microsoft Bot Framework SDK, Activity handler, Bot logic, Teams handler
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 125 additions & 0 deletions msteams-platform/bots/how-to/enable-delete-bot-messages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
title: Enable Delete Bot Messages
description: Learn how to enable users to delete bot messages.
ms.topic: conceptual
ms.author: surbhigupta
ms.localizationpriority: medium
ms.date: 03/12/2025
---

# Enable users to delete bot messages

> [!NOTE]
> Enabling users to delete bot messages is available only in [public developer preview for Teams](../../resources/dev-preview/developer-preview-intro.md).

One of the crucial features of a bot app is to ensure that the conversations remain focused and productive. You can enable users to delete bot messages that contain unintended or inaccurate information. This helps maintain a clean and organized chat environment, which enhances the overall user experience. Enabling this feature in your bot app allows users to:

* **Protect sensitive content**: Users can delete bot messages to eliminate confidential or sensitive content to ensure it remains protected.

<details>
<summary>Here's a use case</summary>

| Use case | How deleting the message helps |
| --- | --- |
| **Context**: Confidential information was initially shared with the in a group chat. However, external users were later added who shouldn't have access to such information. <br><br> **Problem**: When a user searches for related information in the chat, the confidential information is visible to external users who don't have permission to view it. This is a potential security risk of unauthorized access to sensitive data. | **Solution**: Any user can delete information that isn't meant for all group chat members. This ensures that confidential information stays secure and is accessible only to authorized users. |

</details>

* **Remove incorrect information**: Users can delete messages that contain inaccurate or erroneous information.

<details>
<summary>Here's a use case</summary>

| Use case | How deleting the message helps |
| --- | --- |
| **Context**: A user requests the bot to generate a conversation summary, but the bot encounters an error and generates inaccurate summary of the chat. <br><br> **Problem**: The erroneous summary clutters the conversation. | **Solution**: The user deletes the message with errors and submits feedback about the poor bot experience. |

</details>

Adding this feature to your bot improves user experience and keeps conversations contextually relevant. All users in a bot conversation can delete bot messages in one-on-one or group chats. The feature offers a consistent experience across both desktop and mobile clients. Here are some examples:

# [1:1 in desktop client](#tab/personal)

:::image type="content" source="../../assets/images/bots/one-on-one-chat.gif" alt-text="Graphical representation shows the process of deleting a bot message in a one-on-one chat in desktop client":::

# [Group chat in desktop client](#tab/group)

:::image type="content" source="../../assets/images/bots/group-chat.gif" alt-text="Graphical representation shows the process of deleting a bot message in a group chat in desktop client":::

# [In mobile client](#tab/mobile)

:::image type="content" source="../../assets/images/bots/delete-message-mobile.png" alt-text="Image shows the process of deleting a bot message in a mobile client":::

---
<!--
When a user hovers over a bot message, the **Delete** option in the overflow menu appears. Using this option, the user can delete that bot message. After a message is deleted:

1. The bot app prompts users to submit feedback with the reason for deleting a bot message. If the reason is an incorrect bot response, the feedback helps improve bot performance.
1. The deleted message is removed for all users and doesn't appear in searches.
1. An indication replaces the deleted message as shown in the following example:

:::image type="content" source="../../assets/images/bots/message-delete-undo.png" alt-text="Image shows the indication of deleted message and the Undo option.":::
-->
Bot app users can undo deletions in case a message was deleted by mistake. However, the **Undo** option is available for a limited time.

## Enable users to delete bot messages in your bot app

Allowing bot users to delete messages is optional. To add this feature to a bot, it must be enabled in the app and in the tenant. Ensure the following two mandatory configurations to
enable this feature for your bot app:

* [Update app manifest](#update-app-manifest) to enable it in the app.
* [Configure in Admin Center](#configure-in-admin-center) to enable it in the tenant.

### Update app manifest

You can add this functionality to all bots in `personal` and `groupChat` scopes. To enable the option of allowing bot users to delete messages, update the app manifest as follows:

1. Open the `manifest.json` file.
1. Set `scopes` to `personal` or `groupChat` or both.
1. Set `capabilities` to `BotCapabilities`.
1. Set the `allowBotMessageDeleteByUser` property to `true`.

The following code snippet shows an example of app manifest configuration:

```json
{ 
  id: "Id", 
  name: "Contoso", 
  largeImageUrl: "Contoso", 
  validDomains: null, 
  externalId: null, 
  bots: [{ 
        id: "bot-id", 
        "scopes": [
"personal",
"groupChat"
], 
        capabilities: { 
          __typename: "BotCapabilities", 
          isNotificationOnly: true, 
          supportsFiles: false, 
        }, 
allowBotMessageDeleteByUser: true
}],
  manifestVersion: null, 
}   
```

1. Save the updates.

### Configure in Admin Center

If your bot app has opted for this feature, users can delete messages only after the administrator enables it for the app in the tenant.

> [!NOTE]
> Ensure that you update the app description to include information about enabling the feature for your bot app in Admin Center. This is required to enable users in the tenant to delete bot messages.

:::image type="content" source="../../assets/images/bots/admin-center-config.png" alt-text="Image shows the configuration required in Admin Center to enable the feature.":::

For more information, see [messaging settings] [Add link to Admin docs].

## See also

* [Link to end user document]
* [Custom engine agent user experience](teams-conversational-ai/ai-ux.md)
* [Enhance AI-generated bot messages](bot-messages-ai-generated-content.md)