I’m trying to create a subscription to receive notifications about user messages, but I’m receiving an ExtensionError
. I’m basing myself on Team chats
I’ve tried to create a subscription with the sample code I’ve found on Microsoft but I received an error. My expectation is to create a subscription to capture all chat messages on Teams.
My body:
{
"changeType": "created",
"notificationUrl": "https://teams.execute-api.us-east-1.amazonaws.com/dev/notification-listener",
"lifecycleNotificationUrl": "https://teams.execute-api.us-east-1.amazonaws.com/dev/lifecycle-notification-listener",
"resource": "/me/chats",
"expirationDateTime": "2024-12-05T22:00:00Z",
"clientState": "secretClientState",
"latestSupportedTlsVersion": "v1_2"
}
The error I’m receiving:
Internal Server Error - 500 - 5157 ms
{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Specified method is not supported.]",
"innerError": {
"date": "2024-12-02T18:44:12",
"request-id": "7f6ebfd6-dad6-41ec-8c88-1c48478f230d",
"client-request-id": "a3497e47-55a0-dae8-1bc6-0500c1dc4df1"
}
}
}
2
Answers
To make the subscription, your account must be a tenant other than 'Personal'.
Initially, I created one Partner configuration for
Sri
resource group by authorizing Microsoft Graph API to create resources like this:In my case, I ran below API request in Graph Explorer to create subscription for capturing all chat messages of user on Teams:
Response:
Make sure to grant consent to
Chat.Read
permission for signed-in user in Graph Explorer before running the Graph API query:To confirm that, I checked the same in Portal where Partner Topic created successfully as below: