No idea but after trying this out every day and not wanting to work it now suddenly works again. No idea what happened...
Microsoft Graph subscriptions lifecycleUrl not validated
Hi,
So I have been building an API and I wanted to use subscriptions to listen to the calendar events actively.
This seems to work but for some reason, but when I create a subscription delete it and create it again it doesn't try to revalidate the notification URL...
Meaning that if I add a lifecycle URL it doesn't validate that URL either which causes lifecycle notifications not to work.I really want to use lifecycles now to test some things like renewing the subscription etc, but because the lifecycle URL isn't getting validated or used I'm unable to test it properly.
Any idea what I am doing wrong?
Thanks in advance!
EDIT 1:
This is the code I am currently using:
const expirationDateTime = new Date();
expirationDateTime.setDate(expirationDateTime.getDate() + 2);
const client = GraphAuthManager.getAuthenticatedClient(accessToken);
let subscription: Subscription = await client.api(`/subscriptions`).post({
changetype: "created, updated, deleted",
notificationUrl: `https://**domainName**/calendars/msgraph/notify-resource`,
lifecycleNotificationUrl: `https://**domainName**/calendars/msgraph/notify-subscription-lifecycle`,
resource: `users/${roomIdCalendar}/events`,
expirationDateTime: expirationDateTime.toISOString(),
});
To me this looks normal but I don't understand why the url is not called anymore.
Any ideas?