0

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/notificfation",
   "lifecycleNotificationUrl": "https://<domain>/api/lifecylcenotificfation",
   "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: "" };
    }
};

The problem is not to get the callrecords, but in misbehaviour or something I don't know I got no lifecycle notifications.

I tried waiting of expiration, blocking the notification url, delete the app registration, changed/delete the secret, remove necessary API permission.

I waited more than half day i think 5-6 hours as reaction time for lifecycle notification, but I got no lifecycle notification.

Can someone tell me what goes wrong?

ingo_ww
  • 171
  • 1
  • 13
  • Could you please share documentation URL and sample code which you are referring. So that we can try it from our end. – ChetanSharma-msft Sep 27 '21 at 11:07
  • I refer to webhook subscription created with Graph Api [link](https://learn.microsoft.com/de-de/graph/api/resources/webhooks?view=graph-rest-1.0&preserve-view=true) and [link](https://learn.microsoft.com/de-de/graph/api/resources/callrecords-api-overview?view=graph-rest-1.0). The sample code [link](https://ypcode.io/posts/2020/01/explore-microsoft-graph-subscriptions-part-i/) (unmodified because it is my first time I use javascript, normally Iuse c# but publishing c#-example as AzureFunction failed on many exception or framework incompatiblitites. it is the ocde as notifier url code. – ingo_ww Sep 27 '21 at 11:22
  • But it is irrelevant for that, becuase if there is something wrong after registering i the webbhook i should be possible to get webrequests, but there comes nothing and i tested the endpoint as notification url too. So it worked for notification but something prevends for sending azure lifecycle notifications. I have tested it many times, I tested it user notifications too. one of the c#samples come from the tutorial [link](https://learn.microsoft.com/de-de/learn/modules/msgraph-changenotifications-trackchanges/) but this worked only locally with ngrok, with only 1 local endpoint. – ingo_ww Sep 27 '21 at 11:33

1 Answers1

1

Have a look at this documentation - Reduce missing subscriptions and change notifications.

It is mention that-

Lifecycle notifications are supported for subscriptions created on these resource types:

  • Outlook message
  • Outlook event
  • Outlook personal contact
  • Teams chatMessage
Hunaid Hanfee-MSFT
  • 836
  • 1
  • 3
  • 8
  • `For other resource types, you may still provide a lifecycleNotificationUrl when creating the subscription and your application will receive lifecycle notifications whenever the resource implements it.` So callrecords and users have no implemented lifecylce notifications at the moment. Is that correct? – ingo_ww Sep 28 '21 at 10:20
  • Where I get the infos if other resources will implement it which are not mentioned under supported resources for lifecycle notifications? – ingo_ww Sep 28 '21 at 10:53
  • `... will receive lifecycle notifications whenever the resource implements it.` **Where i got conrete infos about supporting or not supporting it ? For me now only callrecords are interested. It seems it is not supported. Is it actual unsupported? Will it be supportorted? ** if I get more infos I set it to solved. – ingo_ww Sep 29 '21 at 09:25
  • You would be able to get the information on Microsoft docs only. callRecords is not supported as of now and we don't have ETA to share when it will get supported. – Hunaid Hanfee-MSFT Oct 05 '21 at 05:47