Graph Lifecycle Notifications Not registering correct endpoint

Viewed 121

I am trying to us the Lifecycle events within the Graph Beta API using code like this:

var subscription = new Subscription
{
     Resource = $"users/{userObjectId}/mailFolders('{resource}')/messages",
     ChangeType = "created,updated",
     NotificationUrl = notificationWebHookUrl,
     LifecycleNotificationUrl = lifecycleNotificationWebHookUrl,
     ClientState = clientState,
     ExpirationDateTime = DateTime.UtcNow + new TimeSpan(0, 0, 4200, 0),
 };

However, even though I have supplied a different LifecycleNotificationUrl to the NotificationUrl, the initial requests to perform the validate request only go to the NotificationUrl endpoint not the LifecycleNotificationUrl endpoint. I have checked and I am definitely supplying different endpoint urls. I am using 2 separate Azure Functions with Http triggers as the endpoints. Also to note is that I am using ngrok for exposing my localhost Azure functions. I understand that if you do not supply a LifecycleNotificationUrl that this is the behaviour that you should expect, but I am.

1 Answers

We currently have an open issue where the validation code is sending two validation requests to the notificationUrl and none to the lifecycleNotificationUrl. This is something we're trying to address, hopefully shortly. I suggest you follow this issue to get notified of any update on the matter.

Besides that, once the validation is passed, lifecycle notifications will get delivered to your lifecycleNotificationUrl and not your notificationUrl.

Related