0

I am using Azure Function (runtime version 1) using .NET Framework 4.6.1. I have been using SharePointPnPCoreOnline package which is deprecated since more than a year. So I installed PnP.Framework 1.10.

PnP.Framework has Newtonsoft.Json dependency > 12.0.3 whereas Microsoft.NET.Sdk.Function 1.0.24 has dependency = 11.0.2.

So I upgraded Microsoft.NET.Sdk.Function to 1.0.38 having Newtonsoft.Json dependency >= 11.0.2.

This worked well and HTTP triggered functions started working fine. But while testing I realized that my Azure Functions having timer trigger are not firing. I have few functions running every 5 minutes stopped working. I waited for more than few hours and none of the timer trigger functions were fired.

I tried resyncing timer triggers by:

  1. Restart your function app in the Azure portal

  2. Send an HTTP POST request to https://{functionappname}.azurewebsites.net/admin/host/synctriggers?code=<API_KEY> using the master key

As mentioned in this post: https://learn.microsoft.com/en-us/answers/questions/526830/azure-timer-trigger-not-firing.html

But this didn't solved the issue. I verified that I have correct AzureWebJobsStorage app setting.

If I rollback all these changes, the azure function starts working fine. So the issue seems to be due to unsupported package.

Any pointer would be helpful. Thank you!

Sushrut Paranjape
  • 429
  • 2
  • 4
  • 17
  • I assume you use Azure Function (runtime version 1) using .NET Framework 4.6.1 due to connection with Dynamics 365? If that is the case then we have good news, we have dynamics sdk available for .net core. So you do not need to deprecate your azure function to Version 1, you can create/run your azure function with .net core on latest and greatest version 3. something. Try this and most probably it shall help. I would suggest create one azure function from scratch. Let me know if this helps. – AnkUser Jul 06 '22 at 14:17
  • 1
    As you're using Azure Functions v1 and some old packages, I'm afraid the best you can do is create a separate Azure Function App with the Time Trigger Functions, and perform an http request to the Azure Function HTTP Trigger that you mentioned are already working. It seems to me, there's some internal dependency or package conflict, but without accessing the project, it's hard to help. This would be the 'easiest' way to solve your issue – Thiago Custodio Jul 06 '22 at 14:31
  • @AnkUser The Azure Function is in use for 3 years to connect to SharePoint and other external systems. So creating new project and migrating existing functions would take longer. – Sushrut Paranjape Jul 06 '22 at 16:25
  • @ThiagoCustodio I will discuss with my team about approach you suggested and update here. – Sushrut Paranjape Jul 06 '22 at 16:27

0 Answers0