chat subscription/notification not working

Tsai Yunda 0 Reputation points
2025-01-26T22:30:41.9433333+00:00

Describe the bug

I followed this document https://learn.microsoft.com/en-us/graph/teams-changenotifications-chatmessage#subscribe-to-changes-at-the-user-level

and created a subscription with '/users/{user-id}/chats/getAllMessages' as resource. The subscription is created successfully and and can see it with a running status and a valid expiration date. However, i cannot recieve notification when new chat message arrives. I can recieve one message once in a while (several hours) but most of the notification did not send to me.

Expected behavior

I can receive all message notifications that are send to a user.

How to reproduce

I followed this document https://learn.microsoft.com/en-us/graph/teams-changenotifications-chatmessage#subscribe-to-changes-at-the-user-level

and created a subscription with '/users/{user-id}/chats/getAllMessages' as resource. The subscription is created successfully and and can see it with a running status and a valid expiration date. However, i cannot recieve notification when new chat message arrives. I can recieve one message once in a while (several hours) but most of the notification did not send to me.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,888 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saranya Madhu-MSFT 1,245 Reputation points Microsoft Vendor
    2025-01-27T06:35:47.5433333+00:00

    Hi Tsai Yunda ,

    Thanks for reaching out to Microsoft!

    As per Microsoft documentation, verify the authenticity of each change notification before running business logic based on resource data included in change notifications.

    A change notification with resource data contains an extra property, validationTokens, which contains an array of JSON Web Tokens (JWT) generated by Microsoft Graph. Therefore, the validationTokens  need to be validated.

    Reference on service limits:

    https://learn.microsoft.com/en-us/graph/throttling-limits#microsoft-teams-service-limits

    Note: APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.