How to fetch chat list and their members with MS graph API

Brass Contributor

Hello, I want to fetch all possible chat rooms and their members with MS Graph API,
I had a similar problem when I wanted to obtain all possible messages but this solved by requesting  Protected APIs in Microsoft Teams form but there is not an endpoint that returns the chat list and also their members.

Thank you in advance

2 Replies

@christosjubile, You can list all the chats along with the members of each chat using below graph API request. 

GET https://graph.microsoft.com/beta/users/8b081ef6-4792-4def-b2c9-c363a1bf41d5/chats?$expand=members

 Currently this request supports delegated level permissions and it doesn't support for application level permission. Please follow this documentation 

@Sridevi-MSFTwill it ever be possible to access the list of all chats using application permissions? Everything else is available with application permissions, but in our case it is pointless without having access to all the chats for a tenant.