your subscription might be already expired.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I'm using the graph api with my delegated user,
and it worked well, but from some days, they are stopped.
So, currently I'm able to generate a subscription:
POST
https://graph.microsoft.com/v1.0/subscriptions
Body:
{
"changeType": "created,deleted,updated",
"notificationUrl": "<my_endpoint_resource>",
"resource": "/chats/<chatId>/messages",
"includeResourceData": false,
"expirationDateTime": "YYYY-MM-DDThh:mm:ss.0000000Z"
}
I am able to receive and answer well to the validation process, and I got the response to the previopus POST cal of subscribe resource:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions/$entity",
"id": "<subId>",
"resource": "/chats/<chatId>/messages",
"applicationId": "<appId>",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "<my_endpoint_resource>",
"notificationQueryOptions": null,
"lifecycleNotificationUrl": null,
"expirationDateTime": "2023-11-10T15:38:00Z",
"creatorId": "<creatorId>",
"includeResourceData": false,
"latestSupportedTlsVersion": "v1_2",
"encryptionCertificate": null,
"encryptionCertificateId": null,
"notificationUrlAppId": null
}
I had verified that the subscriptionId is correctly present calling
GET https://graph.microsoft.com/v1.0/subscriptions/<subId>
and it exists! But when i write or receive messages on that chat, I don't receive any call to my resource.
Edit:
I had changed the resource registered from
"/chats/<chatId>/messages"
to
"/users/<userId>/chats/getAllMessages"
It started to work well, but after some days, without any changes it stopped again.
The subscription is correctly up and running, but no notifications comes from chats
your subscription might be already expired.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".