This post is about the upcoming restriction to Microsoft Teams data via Exchange Web Services (EWS). Microsoft 365 message center notification MC430095 states that Teams data access using EWS is getting restricted by January 31, 2023.

Source: Pexels.com

The EWS APIs are legacy API which Microsoft does not want to be used any further for Teams data export. Furthermore Microsoft states, that it was observed that third-party app were accessing Teams using EWS APIs which is not documented and not supported.

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. 

Restricted access to Microsoft Teams data via EWS starts January 31, 2023 – Microsoft 365 Developer Blog

To export Teams data there is a supported option available: Microsoft Graph Teams Export API.

The latter provides better export capabilities:

  • export 1:1 chats
  • export group chat
  • export meeting chats
  • export channel messages

To utilize the Graph Teams Export API you must be aware of the licensing and required use cases (capacity) for it. There are three options available as depicted below. In case you export Teams data e.g. for backup or migration purposes you have to pay attention to this upcoming restriction if your recent app or services utilizes EWS APIs.

Additional resources