Question

it looks like not possible to prepare an Azure function dealing with the newer small features like dealing with client side pages (e.g. headers part) and any newer as up coming "Page Site Templates": I understand the situation as follows:

1) Azure function v2 can't be used, because running on the .Net Core: (neither OfficeDevPnP.Core version 3.8.1904 these days, nor the Microsoft.SharePointOnline.CSOM)

2) Azure function v1 can't be used, but only till the 2.24.1803 (the latest implementation dependent on the same 9.x version o the NewtonSoft.Json

Or I am mistaken?

What are the current alternatives? (e.g. like using the own app server, registering as listener of an azure queue... or?)

Was it helpful?

Solution

You can use the latest version of PnP Core in Azure Functions v1.

In your project, you first need to install the latest Newtonsoft.JSON package or atleast a version of it > 10.0.3 via Nuget packages.

After that is done, you can install the latest SharePointPnPCoreOnline package.

That's it, after they are installed in the above mentioned sequence, you will be able to use the latest PnP Core in your azure function.

The reason you need to do this is because Newtonsoft.Json package used in the Azure functions SDK is locked at v9 which is older than the one used by PnP Core. Hence, we need to do these additional steps.

Reference - MSBuild task for Azure Functions

Do note, that the upcoming version of PnP Core (3.9.x.x and above), to be released around next week, will be dependent on Newtonsoft.JSON package v11.x.x, so if you are planning to use that then you will be need atleast v11.x.x or above

Additional read - Newtonsoft Version conflicts with Azure Function & PnP-Sites-Core

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top