Bulk delete chats in M365 Copilot
Allow bulk deleting selected chats in M365 Copilot web.
Maintenance Note: This script is for personal usage and will not be actively maintained or updated.
CSS selectors may need to be modified to adapt your account/browser/language
const SELECTORS = {
// Universal Filter: Selects the row ONLY IF it contains the chat menu item button
chatRow: 'div.fai-CopilotNavSubItemGroup div.fui-SplitNavItem:has(button[aria-roledescription="Menu item"])',
// The main button containing the ID
chatBtn: 'button[aria-roledescription="Menu item"]',
// The "More" button (sibling of chatBtn)
moreBtn: '.fai-SplitCopilotNavItem__menuButton',
// Language-proof: Targets the menu item immediately following the visual divider
dropdownDelete: 'div[role="separator"] + div[role="menuitem"]',
// Language-proof: Targets the final confirm button that lacks the restorer attribute
modalConfirm: '.fui-DialogActions button:not([data-tabster])',
// Target for the "Select All" UI
selectAllTarget: 'div.___13wxke1.f1xg1ack.f15twtuk.f19g0ac.fxugw4r',
};
selectAllTargetThis script was developed with AI assistance. While tested, unforeseen issues or bugs may exist. Users assume all risks associated with using this script. The author is not responsible for any direct or indirect losses resulting from its use. Please comply with local laws and regulations.