lifecycle notifications (/communication/CallRecords) doesn't work for me

Ingo2021atMS 1 Reputation point
2021-09-27T09:49:24.46+00:00

I registered a subscription for callrecord.

I tried many, I started with a locally C# app with ngrok and then I used an Azure function with nodejs. Creating the subscription locally without lifecycle notification works fine, creating a subscription with an Azure function with nodeJS works fine too with both urls (notification & lifecycle).

For the post call I used the following JSON:

{
   "resource": "communications/callRecords",,
   "changeType": "created",
   "clientState": "xyz",
   "notificationUrl": "https://<domain>/api/notification",
   "lifecycleNotificationUrl": "https://<domain>/api/lifecylcenotification",
   "expirationDateTime": "2021-08-29T16:36:56.1624377Z",
} 

The registered Azure function for both url's uses the following code:

module.exports = async function (context, req) {
    context.log('Executing Webhook endpoint...');

    // Validate the subscription creation
    if (req.query.validationToken) {
        context.log('Validating new subscription...');
        context.log('Validation token:');
        context.log(req.query.validationToken);
        context.res = {
            headers: {
                'Content-Type': 'text/plain'
            },
            body: req.query.validationToken
        };
    }
    else {
        context.log('Received new notification...');
        context.log('Notification: ');
        context.log(JSON.stringify(req.body));
        context.res = { body: "" };
    }
};

I tried many and spend many time but in no case I got a lifecycle notification but it was everytime successfully registered for it.

Can aynone help or tell me what could be wrong?

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

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 5,946 Reputation points
    2022-03-17T13:17:35.437+00:00

    Hi @Ingo2021atMS

    CallRecords is not supported as of now for lifecycle notifications.
    Lifecycle notifications are supported for subscriptions created on these resource types:

    Outlook message
    Outlook event
    Outlook personal contact
    Teams chatMessage

    You can Refer to this document for more information

    Since this feature/functionality is presently not available, you can submit a feature request idea using this support link, which will be monitored by Microsoft team and make the enhancements to Microsoft Graph APIs. I will also upvote for you.

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

    0 comments No comments