Microsoft Teams: List all Chats regardless of users
Asked Answered
P

2

7

We would like to achieve an eDiscovery integration that can track all past and new chat & channel messages.

But we observed that with Delegated Permissions, the app can only list Chats that the user (admin or not) is a member of; while with Application Permissions the list Chats endpoint is not supported.

Searching through the site we see this question: How to retrieve another user's MS Teams chats with the Microsoft Graph API?

Which indicates it's not possible. But his question was a bit different than ours and it was about a year ago. So I'd like to confirm:

  1. Is it possible to list ALL Chats in the tenant? If yes, how?
  2. If it's currently not supported, is there a roadmap or schedule to support it?
  3. Seems the linked question was about impersonating an user and list his/her Chats. Is it still not supported?

Thanks!

Patmore answered 8/7, 2020 at 9:20 Comment(4)
Thank you for reaching out to us We will investigate and if we require further information we will reach out. Best regards, Teams PlatformPillory
@Subhasish-MSFT To have things like production issues channel, build channels, etc, and let a bot monitor the channel conversations woulb be a huge step forward. We need a way to get this access programmatically.Shortie
@MagnusKarlsson - we are discussing this with engineering team. Will update you back.Pillory
There is no direct mechanism currently, but you could create a subscription and get all chat messages in the organization.Pillory
P
0

It is currently in our backlog but there is no ETA on this. You could create a subscription and get all chat messages in the organization

Pillory answered 15/7, 2020 at 9:57 Comment(2)
Oh and we already use the subscriptions for all messages, but that only covers the future messages. Listing all Chats would let us get all the past messages. So it would still be very helpful.Patmore
Yes, You could get only future message with subscription.Pillory
S
0

This can be done with graph API currently in beta.

GET /teams/{id}/channels/{id}/messages

https://learn.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-beta&tabs=http

Shortie answered 15/7, 2020 at 11:52 Comment(1)
Thanks, but that endpoint is for Channel messages, but we’re looking for Chats. Which I suppose is confirmed not able to list all in the tenant currently.Patmore

© 2022 - 2024 — McMap. All rights reserved.