How to lists different Chat information from Tenant

Check out here to learn how to retrieve the list of different type of Chat details using Microsoft Graph API with Microsoft Graph Explorer.

Microsoft Graph API extending its features across the Microsoft 365 Cloud. One of the features is MS Teams. In this blog, we are going to see how to get the different chat information for different scenarios.

To view the list of chats, we must consent with any one of the below Microsoft Graph API permissions,
MS Graph List Chat permissions

  • Chat.ReadBasic
  • Chat.Read
  • Chat.ReadWrite

To get all the chats from the tenant,
Method: Get

https://graph.microsoft.com/beta/chats

Below is the sample screenshot is taken from Microsoft Graph Explorer and this returns all the chats with basic details.
Chat Details

To get all the chats for the current user,
Method: get

https://graph.microsoft.com/beta/me/chats

To get all the chats for the specified user,
Method: Get

https://graph.microsoft.com/beta/users/<User id>/chats

To get only meeting chats for the specified user
Method: Get

https://graph.microsoft.com/beta/users/<User id>/chats?$filter=chatType eq ‘meeting’

To get only the One on One chat for the specified user,
Method: Get

https://graph.microsoft.com/beta/users/<User id>/chats?$filter=chatType eq ‘OneonOne’

To get only the group chats for the specified user
Method: Get

https://graph.microsoft.com/beta/users/<User id>/chats?$filter=chatType eq ‘group’

Shantha Kumar
Shantha Kumar
Articles: 280

24,849 Comments

  1. Does this require special license?
    Also, what are you using for User ID? I have tried UPN, ID (from user profile object) and email and none are a valid endpoint

    • let me give you some context.

      I have just managed to get this to work in Graph explorer. After reading it properly at last!

      But I am trying to get this to work from a Power Automate Flow using connector “send an Http Request” connector

      Oh – can’t attach screenshot

      here is error message

      “URI path is not a valid Graph endpoint, path is neither absolute nor relative or resource/object is not supported for this connector. Resources: me,users Objects: messages,mailFolders,events,calendar,calendars,outlook,inferenceClassification. Uri: https://graph.microsoft.com/beta/me/chats

Comments are closed.