Microsoft Graph partner events lifecycle notifications stopped and subscription expired

Alistair Young 51 Reputation points
2025-04-02T08:03:41.0666667+00:00

I have a function app running on consumption plan, subscribed to an Event Grid partner topic. It works mostly, receiving lifecycle notifications and auto-renewing the subscription. Every few days though, in the middle of the night, between 1-3am, it just stops. There are no log entries for any lifecycle event and application insights shows no failures in the period. The subscription just disappears. Either it just disappeared, or Azure didn't send the

reauthorizationRequired

message or the consumption plan failed and the function wasn't running when the lifecycle notification was sent. Given there are no errors anywhere in application insights for the function app, is this a limitation of the consumption plan, that it may just stop in the middle of the night? The subscription is for user events in Entra so there will likely not be any in the middle of the night and the plan shuts down.

It seems to be related to this consumption plan behaviour where the plan just goes to sleep and needs to be manually awakened. That would explain the missed lifecycle notifications.

Is it necessary to run a TimerTrigger in the function app every few minutes to monitor the subscription and renew independently of Azure, if it's on a consumption plan?

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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.