Teams Channel-level subscription not sending notifications, but is sending lifecyclenotifications

Anthony Byrne 20 Reputation points
2025-02-18T12:44:56.3233333+00:00

Hi,

A project i'm working on requires receiving updates whenever a reply is added to a post in a MS Teams Channel.

I have subscribed to the channel level notifications using the POST https://graph.microsoft.com/v1.0/subscriptions with the following body:

{
	"changeType": "created,updated",
	"notificationUrl": "https://{domain}/webhooks/updatenotification",
	"lifecycleNotificationUrl": "https://{domain}/webhooks/lifecyclenote",
	"resource": "/teams/{team_id}/channels/{channel_id}/messages",
	"expirationDateTime": "2025-02-19T23:20:00.000Z",
	"clientState": "{clientState_value}"
}

When I make this request, I can see the verification request come through and is successful. I can verify this by calling GET https://graph.microsoft.com/v1.0/subscriptions. This yields the following response, confirming it has been created.

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions",
    "value": [
        {
            "id": "{id}",
            "resource": "/teams/{team_id}/channels/{channel_id}/messages",
            "applicationId": "{applicationId}",
            "changeType": "created,updated",
            "clientState": null,
            "notificationUrl": "https://{domain}/webhooks/updatenotification",
            "notificationQueryOptions": null,
            "lifecycleNotificationUrl": "https://{domain}/webhooks/lifecyclenote",
            "expirationDateTime": "2025-02-19T23:20:00.000Z",
            "creatorId": "{creatorId}",
            "includeResourceData": null,
            "latestSupportedTlsVersion": "v1_2",
            "encryptionCertificate": null,
            "encryptionCertificateId": null,
            "notificationUrlAppId": null
        }
    ]
}

Now the subscription exists, but I am not receiving any notifications on my notificationUrl, no matter the activity. If I create a post, reply to one, update/edit a post or message, nothing I do can seem to trigger this.

I know the correct team_id and channel_id are being used because I can create posts in this channel with these same values.

I have tried recreating it with a close expiration date, and indeed, I am receiving requests for my lifecycleNotificationUrl; an example of this is given below.

{
	value: [
		{
			subscriptionId: '{subscriptionId}',
			resource: 'Subscriptions/{subscriptionId}',
			clientState: '{}',
			resourceData: [Object],
			encryptedContent: null,
			organizationId: '{organizationId}',
			subscriptionExpirationDateTime: '2025-02-18T04:20:00-08:00',
			lifecycleEvent: 'reauthorizationRequired'
		}
	]
}

Can anyone help me understand why I'm not receiving notifications?

Thank you.

Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saranya Madhu-MSFT 2,375 Reputation points Microsoft External Staff
    2025-02-19T08:16:29.96+00:00

    Hi Anthony Byrne,

    Thanks for reaching out to Microsoft!

    As per the documentation, While the subscription is valid and there are changes to the resource that you subscribed to, Microsoft Graph sends a POST request to the notificationUrl with details of the changes. This payload is the change notification.

    For most subscriptions, Microsoft Graph doesn't delay sending notifications but delivers all notifications within the SLA unless the service is experiencing an incident.

    A change notification payload sent to your endpoint can contain a collection of change notifications relating to your subscriptions.

    Make sure to validate your notificationUrl , the client must properly decode the URL to get the plain text validation token from Microsoft Graph.

    Note: reauthorizationRequired lifecycle events alert you when Microsoft Graph requires the app to reauthorize the subscription, for example in the following cases:

    When the access token is about to expire.

    When a subscription is about to expire.

    When an administrator has revoked your app's permissions to read a resource.

    reauthorizationRequired notifications

    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.


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.