How to subscribe to Teams Chats notification

Azizkhon Ishankhonov 195 Reputation points
2023-12-15T13:55:10.9333333+00:00

I want to get a notification via webhook or any alternative way when someone sends me a message in MS Teams with delegated permission.
A couple of days ago I used /users/{id}/chats/getAllMessages but currently it does support in delegated context.

Application context requires Chat.Read.All permission which allows to app to read all one-to-one chat messages across a company/organization which is not allowed by law.

How I can solve the problem?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,122 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,654 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,868 questions
{count} votes

Accepted answer
  1. Deepanshu Sharma 415 Reputation points Microsoft Vendor
    2023-12-17T19:11:34.8533333+00:00

    Hellow @Azizkhon Ishankhonov

    Welcome to the community.

    Please refer to https://learn.microsoft.com/en-us/graph/teams-changenotifications-chatmessage#subscribe-to-changes-at-the-user-level

    This resource supports including resource data in the notification in both delegated and application-only modes.User's image


0 additional answers

Sort by: Most helpful