Restricted access to Microsoft Teams data via EWS starts September 30, 2022 

Microsoft Teams team

Exchange Web Services (EWS) are the legacy APIs used to create clients and services that connect to Exchange to get access to mailbox information. We have observed over time that a number of 3rd party apps are accessing Teams messages through EWS. This approach is both undocumented and unsupported by Microsoft and poses the risk of code failure, as Teams may change the location and use of message data at any time. 

Microsoft will start restricting access via EWS to Teams message data starting on September 30th, 2022.  Fully supported access to Teams message data is available through the Microsoft Graph Teams Export API. Teams Export APIs allow you to export 1:1, group chat, meeting chats, and channel messages from Microsoft Teams.  

If your organization’s application needs to export Microsoft Teams messages, you can extract them using Teams Export APIs, refer to Teams Export API for assistance. 

For questions on use of the EWS APIs, refer to our documentation (EWS reference for Exchange) which includes information about the operations that are available in EWS, and XML reference documentation that provides information about the instance XML that is sent to and received from Exchange.