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

%3CLINGO-SUB%20id%3D%22lingo-sub-2272191%22%20slang%3D%22en-US%22%3EHow%20to%20obtain%20chat%20list%20and%20their%20members%20with%20MS%20graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2272191%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20want%20to%20fetch%20all%20possible%20chat%20rooms%20and%20their%20members%20with%20MS%20Graph%20API%2C%3CBR%20%2F%3EI%20had%20a%20similar%20problem%20when%20I%20wanted%20to%20obtain%20all%20possible%20messages%20but%20this%20solved%20by%20requesting%20%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fteams-protected-apis%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EProtected%20APIs%20in%20Microsoft%20Teams%3C%2FA%3E%20form%20but%20there%20is%20not%20an%20endpoint%20that%20returns%20the%20chat%20list%20and%20also%20their%20members.%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2272191%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional 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.