Export Microsoft 365 Copilot conversations as ChatGPT-compatible conversations.json
Export Microsoft 365 Copilot conversations as ChatGPT-compatible conversations.json.
A Tampermonkey userscript that bulk-exports your Copilot Chat history from m365.cloud.microsoft/chat into the same JSON format as a ChatGPT data export, so it works with any tool that reads ChatGPT exports.
conversations.json in the same format as a ChatGPT data exportThe script reads your existing MSAL authentication token from the browser's localStorage (the same token Microsoft 365 already has) and calls the Substrate API endpoints that the Copilot Chat UI itself uses. No additional login or Azure AD app registration is required.
copilot_chat_capture.user.jsGetChats pagination endpointHat tip to M365 Copilot Exporter by ganyuke — the MSAL token decryption approach and Substrate API request format were adapted from that project. This script differs by outputting ChatGPT-compatible conversations.json (instead of raw per-conversation JSON files), adding date range filtering, and running as a single zero-dependency userscript.