1
votes

Until now to get Microsoft Teams messages I check the subject field to see if it contains "IM" as described in the documentation:

GET messages returns chats in Microsoft Teams

In both the v1 and beta endpoints, the response of GET /users/id/messages includes the user's Microsoft Teams chats that occurred outside the scope of a team or channel. These chat messages have "IM" as their subject.

For the past few days, that "IM" is no longer showing up in the subject of the message, so now we have no information to determine if it's a Teams chat.

1

1 Answers

2
votes

The "known issue" was that /messages was returning these messages. It sounds like they rolled out a fix for this issue. Since this was considered a bug, the current state is how it was designed to work - /messages was intended to only return email messages.

This is why it's not a good idea to pull a dependency on a known issue; when they fix the issue, it breaks your code. At the moment there doesn't seem to be a mechanism to retrieve these messages but, based on this PR in the documentation, it looks like it will be coming soon.