You can use the Copilot Activity Export API to retrieve interactions between a user and Microsoft Copilot across apps like Teams, Word, and Outlook.
GET https://graph.microsoft.com/v1.0/copilot/users/{userId}/interactionHistory/getAllEnterpriseInteraction
Limitations of Microsoft Graph API for Teams Chat
- The standard Graph API for Teams does not allow access to Copilot chats as regular one-on-one messages.
- Copilot chats are not stored as typical Teams messages and are not accessible via
chatMessageorchannelMessageendpoints. - You cannot use Graph API to fetch Copilot chats unless you use the Copilot-specific APIs.
Alternative: Copilot Chat API
If you're building custom integrations, the Copilot Chat API allows you to initiate and continue conversations with Copilot programmatically.
However:
- It’s not meant for retrieving past chats.
- It’s focused on real-time interaction, not history export.