0
votes

Teams stores channel conversations in a hidden folder in an Office 365 group. I’m looking for a programmatic way for us to access/log all of that data in as near real time as possible. I've looked at going through Exchange, the eDiscovery API and also the Graph API and I can't find any way of doing this.

If this is something a bot could do that’d be best, but I don’t think bots can actually follow channel conversations. They only seem to be called when they are @ mentioned.

1

1 Answers

2
votes

After a lot of looking around and playing with APIs, it looks like the best way to do this kind of thing is going via the Microsoft Exchange API.

https://github.com/OfficeDev/ews-managed-api

There are 2 different things I'm using this for- one is just regular archiving of channel information and private messages. The EWS API makes this not too challenging. The other is to give a bot insight into a conversation preceding it being mentioned. This is a little slow, can take up to a minute from the original message being input into Teams.

I really wish this was a part of Teams to begin with, and clearly I am not alone: https://microsoftteams.uservoice.com/forums/555103-public/suggestions/16940815-ability-to-archive-channels-and-chats

You have to be careful not to be too aggressive as you can get throttled.